Merge pull request #54 from MikeyRay/main

fuck you ivy
This commit is contained in:
Ian 2023-03-26 20:32:30 -04:00 committed by GitHub
commit c07a642d55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1083,6 +1083,9 @@ void() power_switch =
// -------------------- // --------------------
// //
#define MBOX_SPAWNFLAG_NOTHERE 1
#define MBOX_SPAWNFLAG_NOLIGHT 2
void() updateBoxGlow void() updateBoxGlow
{ {
if(self.goaldummy) if(self.goaldummy)
@ -1302,7 +1305,7 @@ void() findboxspot =
newspot.angles_y += 90; newspot.angles_y += 90;
// Spawn the Box Glow if permitted // Spawn the Box Glow if permitted
if (!(self.owner.spawnflags & 2)) if (!(self.owner.spawnflags & MBOX_SPAWNFLAG_NOLIGHT))
{ {
entity g; entity g;
g = spawn(); g = spawn();
@ -1329,7 +1332,7 @@ void() findboxspot =
void() remove_box = void() remove_box =
{ {
if (!(self.owner.spawnflags & 2)) if (!(self.owner.spawnflags & MBOX_SPAWNFLAG_NOLIGHT))
setmodel(self.owner.goaldummy, ""); setmodel(self.owner.goaldummy, "");
self.owner.frame = 0; // set box frame self.owner.frame = 0; // set box frame
@ -1663,21 +1666,27 @@ void() mystery_box =
setmodel (self, "models/machines/mystery.mdl"); setmodel (self, "models/machines/mystery.mdl");
setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX); setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
if (!(self.spawnflags & 2))
{
local entity g;
g = spawn();
self.goaldummy = g;
setmodel(g,"models/machines/mglow$.mdl");
setorigin(g,self.origin);
g.angles = self.angles;
}
self.touch = mystery_touch; self.touch = mystery_touch;
boxOrigin = self.origin; boxOrigin = self.origin;
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 = spawn();
temp.owner = self;
temp.think = findboxspot;
temp.nextthink = time + 0.1;
} else if(!(self.spawnflags & MBOX_SPAWNFLAG_NOLIGHT)) {
entity g = spawn();
self.goaldummy = g;
setmodel(g,"models/machines/mglow$.mdl");
setorigin(g,self.origin);
g.angles = self.angles;
}
} }
// //