mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-24 21:02:14 +00:00
SERVER: Fix perk_random entity linking
This commit is contained in:
parent
7e441e3ae9
commit
3404e9a706
1 changed files with 6 additions and 2 deletions
|
@ -1371,7 +1371,7 @@ void() Perk_RandomDecide =
|
|||
// If a perk_random entity has already placed down a Perk-A-Cola
|
||||
// given it's respective spawnflag, remove it from the ent selection.
|
||||
for(i = 1; i < 256; i *= 2) {
|
||||
if ((perk_random_placed & i) && (self.spawnflags & 1))
|
||||
if ((perk_random_placed & i) && (self.spawnflags & i))
|
||||
self.spawnflags -= self.spawnflags & i;
|
||||
}
|
||||
|
||||
|
@ -1436,8 +1436,12 @@ void() perk_random =
|
|||
objerror("No available Perks to choose from!");
|
||||
}
|
||||
|
||||
// Link this entity so that moving existing Perk-A-Cola machines
|
||||
// receive a viable teleport location.
|
||||
setorigin(self, self.origin);
|
||||
|
||||
// We can't transform right away, because we need to assert that
|
||||
// all other entities are loaded in the world.
|
||||
self.think = Perk_RandomDecide;
|
||||
self.nextthink = time + 0.2;
|
||||
self.nextthink = time + 5;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue