]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Cvar the server part of the effect
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Apr 2011 16:02:14 +0000 (19:02 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Apr 2011 16:02:14 +0000 (19:02 +0300)
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/g_violence.qc

index e9e50c5c171659d2d9a022d28a7e41dbdc698ced..de5299ece58acdd2e358ea164d2631e7709b1e05 100644 (file)
@@ -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"
index d5652b775e4620b3831c96b0ae44d16ba1f737b8..815650bb6e428482fcdfdb03f9b4600ab32244f2 100644 (file)
@@ -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;
index d37b57475d986f999f15fe46a7b171b10a01eabc..fc580765de94194a5f12d328118d715daa749dbf 100644 (file)
@@ -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;