Skip to content

Commit f0e8bdf

Browse files
authored
SERVER: Add ability to put Ray Gun Mk II in Mystery Box (#156)
* SERVER: Add ability to put Ray Gun Mk II in Mystery Box * Mk II should not be enabled by default
1 parent 72abfe2 commit f0e8bdf

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

source/server/defs/custom.qc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ string game_modifier_hellhound_fog_color;
507507
string game_modifier_default_fog_color;
508508

509509
// Mystery Box
510-
#define MAX_BOX_WEAPONS 27
510+
#define MAX_BOX_WEAPONS 28
511511

512512
.float boxstatus;
513513
.entity boxweapon;

source/server/entities/mystery_box.qc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,7 @@ float MBOX_GetWeaponIDFromMB1(float mbox_id) =
757757
case 24: return W_TYPE;
758758
case 25: return W_MP5K;
759759
case 26: return W_SPRING;
760+
case 27: return W_RAYMK2;
760761
default: return W_COLT;
761762
}
762763
return W_COLT;
@@ -958,6 +959,11 @@ void() MBOX_LoadData =
958959
mystery_box_weapons[i].weapon_id = MBOX_GetWeaponIDFromMB1(i);
959960
mystery_box_weapons[i].allowed = true;
960961
mystery_box_weapons[i].rarity = -1;
962+
963+
// .. except the Mk II
964+
if (mystery_box_weapons[i].weapon_id == W_RAYMK2) {
965+
mystery_box_weapons[i].allowed = false;
966+
}
961967
}
962968

963969
// Precache it all.

source/shared/weapon_stats.qc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5278,6 +5278,7 @@ float(string weapon) WepDef_GetWeaponIDFromName =
52785278
case "wunderwaffe": return W_TESLA;
52795279
case "mp5k": return W_MP5K;
52805280
case "springfield": return W_SPRING;
5281+
case "ray_gun_2": return W_RAYMK2;
52815282
default: return W_NOWEP;
52825283
}
52835284
return W_COLT;

0 commit comments

Comments
 (0)