Set max sprays to a CVar.
This commit is contained in:
parent
f02ef045c1
commit
b750dd6663
@ -148,6 +148,11 @@ Shake before attempting to spray.
|
||||
|
||||
Use firemode to select spray pattern.
|
||||
|
||||
Use the CVar snektech_spraypattern to directly set a spray pattern
|
||||
Use the CVar `snektech_spraypattern` to directly set a spray pattern
|
||||
name.
|
||||
|
||||
Use the CVar `snektech_maxspraysperplayer` to set the number of images
|
||||
each player can spray before old ones are no longer refreshed
|
||||
(non-refreshed ones will eventually disappear).
|
||||
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
server int snektech_spawnflags = 11;
|
||||
server int snektech_maxspraysperplayer = 10;
|
||||
user string snektech_spraypattern = "SnekSpray_TransPride";
|
||||
|
@ -408,7 +408,9 @@ class SnekTechSprayerDecalSpawner : Actor
|
||||
continue;
|
||||
}
|
||||
|
||||
if(otherSpawner.thisSprayerId < (thisSprayerId - 10)) {
|
||||
int maxSpraysPerPlayer =
|
||||
CVar.GetCVar("snektech_maxspraysperplayer").GetInt();
|
||||
if(otherSpawner.thisSprayerId <= (thisSprayerId - maxSpraysPerPlayer)) {
|
||||
if(otherSpawner.master == master) {
|
||||
otherSpawner.Destroy();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user