From: Mircea Kitsune Date: Sat, 2 Apr 2011 16:02:14 +0000 (+0300) Subject: Cvar the server part of the effect X-Git-Tag: xonotic-v0.6.0~110^2^2~185 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=88a6707668f9d519eca59ab12775c5c226f24ee7;p=xonotic%2Fxonotic-data.pk3dir.git Cvar the server part of the effect --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index e9e50c5c1..de5299ece 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -349,6 +349,9 @@ set g_telefrags_teamplay 1 "never telefrag team mates" set g_telefrags_avoid 1 "when teleporters have a random destination, avoid teleporting to locations where a telefrag would happen" set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed" +set g_damageeffect_tick 0.5 "how often the damage effect is updated (particles per second), low values might cause lag" +set g_damageeffect_lifetime 3 "how much a damage effect lasts" + set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns" set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate" set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would" diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index d5652b775..815650bb6 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -1215,6 +1215,8 @@ float autocvar_sv_warsowbunny_topspeed; float autocvar_sv_warsowbunny_turnaccel; string autocvar_sv_weaponstats_file; float autocvar_sv_gibhealth; +float autocvar_sv_damageeffect_tick; +float autocvar_sv_damageeffect_lifetime; float autocvar_sys_ticrate; float autocvar_teamplay_lockonrestart; float autocvar_teamplay_mode; diff --git a/qcsrc/server/g_violence.qc b/qcsrc/server/g_violence.qc index d37b57475..fc580765d 100644 --- a/qcsrc/server/g_violence.qc +++ b/qcsrc/server/g_violence.qc @@ -76,7 +76,7 @@ void Violence_WeaponDamage_DoRepeat() } Violence_WeaponDamage(self.owner, self.cnt); - self.nextthink = time + 0.5; // TO BE CVARED + self.nextthink = time + autocvar_sv_damageeffect_tick; } void Violence_WeaponDamage_SetRepeat(entity pl, float type) @@ -91,7 +91,7 @@ void Violence_WeaponDamage_SetRepeat(entity pl, float type) repeater.owner = pl; repeater.origin = pl.origin; repeater.cnt = type; - repeater.lifetime = time + 3; // TO BE CVARED + repeater.lifetime = time + autocvar_sv_damageeffect_lifetime; repeater.think = Violence_WeaponDamage_DoRepeat; repeater.nextthink = time;