mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-21 19:32:21 +00:00
SERVER: Scale Mystery Box down in NZ:P Beta
This commit is contained in:
parent
e2da52c1f3
commit
5c66559922
2 changed files with 52 additions and 1 deletions
|
@ -101,6 +101,7 @@ void(entity ent) MBOX_FreeEnt =
|
|||
ent.classname = "freeMboxEntity";
|
||||
ent.touch = SUB_Null;
|
||||
ent.think = SUB_Null;
|
||||
ent.scale = 1;
|
||||
ent.effects = 0;
|
||||
ent.frame = 0;
|
||||
|
||||
|
@ -237,6 +238,10 @@ void() findboxspot =
|
|||
setmodel (newspot, mystery_box_model);
|
||||
newspot.frame = 0;
|
||||
setsize (newspot, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
||||
|
||||
// Scale down for NZ:P Beta
|
||||
if (map_compatibility_mode == MAP_COMPAT_BETA)
|
||||
newspot.scale = 0.75;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -276,6 +281,10 @@ void() MBOX_FindNewSpot =
|
|||
setmodel(new_box, mystery_box_model);
|
||||
setsize(new_box, VEC_HULL2_MIN, VEC_HULL2_MAX);
|
||||
|
||||
// Scale down for NZ:P Beta
|
||||
if (map_compatibility_mode == MAP_COMPAT_BETA)
|
||||
new_box.scale = 0.75;
|
||||
|
||||
// Spawn the Box Glow if permitted
|
||||
if (!(new_box.spawnflags & MBOX_SPAWNFLAG_NOLIGHT))
|
||||
{
|
||||
|
@ -590,7 +599,14 @@ void() Create_Floating_Weapon =
|
|||
gun.movetype = MOVETYPE_NOCLIP;
|
||||
gun.solid = SOLID_NOT;
|
||||
makevectors(self.angles);
|
||||
gun.velocity = v_up*15;
|
||||
|
||||
// Float up less in NZ:P Beta, and scale down.
|
||||
if (map_compatibility_mode == MAP_COMPAT_BETA) {
|
||||
gun.velocity = v_up*10;
|
||||
gun.scale = 0.75;
|
||||
} else {
|
||||
gun.velocity = v_up*15;
|
||||
}
|
||||
|
||||
gun.owner = self;
|
||||
self.boxweapon = gun;
|
||||
|
|
|
@ -290,6 +290,40 @@ void() Compat_ConvertBetaBarricade =
|
|||
|
||||
void() item_cover = {map_compatibility_mode = MAP_COMPAT_BETA; item_barricade(); Compat_ConvertBetaBarricade();};
|
||||
|
||||
//
|
||||
// NZ:P Beta Mystery Box
|
||||
//
|
||||
|
||||
//
|
||||
// Compat_FixMysteryBox
|
||||
// Fixes the Mystery Box scale, and removes glow from
|
||||
// all of the spawn points.
|
||||
//
|
||||
void() Compat_FixMysteryBox =
|
||||
{
|
||||
entity mystery_box = find(world, classname, "mystery");
|
||||
|
||||
while(mystery_box != world) {
|
||||
mystery_box.scale = 0.75;
|
||||
mystery_box.spawnflags += MBOX_SPAWNFLAG_NOLIGHT;
|
||||
|
||||
if (mystery_box.goaldummy) {
|
||||
MBOX_FreeEnt(mystery_box.goaldummy);
|
||||
mystery_box.goaldummy = world;
|
||||
}
|
||||
|
||||
mystery_box = find(mystery_box, classname, "mystery");
|
||||
}
|
||||
|
||||
entity mystery_box_spots = find(world, classname, "mystery_box_tp_spot");
|
||||
|
||||
while(mystery_box_spots != world) {
|
||||
mystery_box_spots.spawnflags += MBOX_SPAWNFLAG_NOLIGHT;
|
||||
|
||||
mystery_box_spots = find(mystery_box_spots, classname, "mystery_box_tp_spot");
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// NZ:P Beta Power Switch
|
||||
//
|
||||
|
@ -375,4 +409,5 @@ void() Compat_Init =
|
|||
Compat_ConvertBetaWallWeapons();
|
||||
Compat_ConvertPropScaling();
|
||||
Compat_FixPowerSwitch();
|
||||
Compat_FixMysteryBox();
|
||||
}
|
Loading…
Reference in a new issue