mirror of
https://github.com/nzp-team/quakec.git
synced 2025-03-22 19:02:35 +00:00
SERVER: Fix Zap-O-Matic cooldown timer being ignored
This commit is contained in:
parent
c50a6dc939
commit
e7a78fae5b
1 changed files with 4 additions and 1 deletions
|
@ -198,6 +198,8 @@ void zapper_start(string zapper) {
|
|||
entity zents;
|
||||
entity tempe;
|
||||
|
||||
float lasting_time = 0;
|
||||
|
||||
zents = find(world, zappername, zapper);
|
||||
while (zents)
|
||||
{
|
||||
|
@ -207,6 +209,7 @@ void zapper_start(string zapper) {
|
|||
tempe = self;
|
||||
self = zents;
|
||||
self.state = 1;
|
||||
lasting_time = self.calc_time;
|
||||
A_ElecSwitchOn1();
|
||||
self = tempe;
|
||||
} else if (zents.classname == "zapper_node" && zents.target) {
|
||||
|
@ -218,7 +221,7 @@ void zapper_start(string zapper) {
|
|||
|
||||
tempe = spawn();
|
||||
tempe.think = zapper_stop;
|
||||
tempe.nextthink = time + 2;
|
||||
tempe.nextthink = time + lasting_time;
|
||||
tempe.zappername = zapper;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue