mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-22 20:01:34 +00:00
SERVER: Fix issue with trying to use a tempent before allocation
This commit is contained in:
parent
7694538f00
commit
5576c98910
1 changed files with 23 additions and 18 deletions
|
@ -1409,6 +1409,27 @@ void() Float_Change =
|
||||||
self.think = Float_Change;
|
self.think = Float_Change;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void() finish_mbox_setup =
|
||||||
|
{
|
||||||
|
// Temporary hack for random box spawns until rewrite - Mikey (27/03/2023, DD/MM/YYYY)
|
||||||
|
if(self.spawnflags & MBOX_SPAWNFLAG_NOTHERE) {
|
||||||
|
entity temp = MBOX_GetFreeEnt();
|
||||||
|
temp.classname = "mystery_helper";
|
||||||
|
|
||||||
|
temp.owner = self;
|
||||||
|
temp.think = findboxspot;
|
||||||
|
temp.nextthink = time + 0.1;
|
||||||
|
} else if(!(self.spawnflags & MBOX_SPAWNFLAG_NOLIGHT)) {
|
||||||
|
entity g = MBOX_GetFreeEnt();
|
||||||
|
g.classname = "mystery_glow";
|
||||||
|
|
||||||
|
self.goaldummy = g;
|
||||||
|
setmodel(g,"models/machines/mglow$.mdl");
|
||||||
|
setorigin(g,self.origin);
|
||||||
|
g.angles = self.angles;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void() allocate_floating_weapons =
|
void() allocate_floating_weapons =
|
||||||
{
|
{
|
||||||
self.think = SUB_Null;
|
self.think = SUB_Null;
|
||||||
|
@ -1419,6 +1440,8 @@ void() allocate_floating_weapons =
|
||||||
entity tempe = spawn();
|
entity tempe = spawn();
|
||||||
tempe.classname = "freeMboxEntity";
|
tempe.classname = "freeMboxEntity";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
finish_mbox_setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void() Create_Floating_Weapon =
|
void() Create_Floating_Weapon =
|
||||||
|
@ -1691,24 +1714,6 @@ void() mystery_box =
|
||||||
boxLocations[boxCount] = self;
|
boxLocations[boxCount] = self;
|
||||||
boxCount++;
|
boxCount++;
|
||||||
|
|
||||||
// Temporary hack for random box spawns until rewrite - Mikey (27/03/2023, DD/MM/YYYY)
|
|
||||||
if(self.spawnflags & MBOX_SPAWNFLAG_NOTHERE) {
|
|
||||||
entity temp = MBOX_GetFreeEnt();
|
|
||||||
temp.classname = "mystery_helper";
|
|
||||||
|
|
||||||
temp.owner = self;
|
|
||||||
temp.think = findboxspot;
|
|
||||||
temp.nextthink = time + 0.1;
|
|
||||||
} else if(!(self.spawnflags & MBOX_SPAWNFLAG_NOLIGHT)) {
|
|
||||||
entity g = MBOX_GetFreeEnt();
|
|
||||||
g.classname = "mystery_glow";
|
|
||||||
|
|
||||||
self.goaldummy = g;
|
|
||||||
setmodel(g,"models/machines/mglow$.mdl");
|
|
||||||
setorigin(g,self.origin);
|
|
||||||
g.angles = self.angles;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.think = allocate_floating_weapons;
|
self.think = allocate_floating_weapons;
|
||||||
self.nextthink = time + 0.2;
|
self.nextthink = time + 0.2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue