mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-22 20:01:34 +00:00
SERVER: Fix Mystery Box obtained status for host
This commit is contained in:
parent
9d4e39c0cb
commit
060b157a4c
1 changed files with 5 additions and 1 deletions
|
@ -623,12 +623,16 @@ void() mystery_box_tp_spot =
|
||||||
|
|
||||||
void() MBOX_UpdatePosessionStatus =
|
void() MBOX_UpdatePosessionStatus =
|
||||||
{
|
{
|
||||||
|
// Set all weapon statuses as unobtained.
|
||||||
|
for(float i = 0; i < MAX_BOX_WEAPONS; i++) {
|
||||||
|
mystery_box_weapons[i].already_obtained = false;
|
||||||
|
}
|
||||||
|
|
||||||
entity player = find(world, classname, "player");
|
entity player = find(world, classname, "player");
|
||||||
|
|
||||||
while(player != world) {
|
while(player != world) {
|
||||||
for(float i = 0; i < MAX_BOX_WEAPONS; i++) {
|
for(float i = 0; i < MAX_BOX_WEAPONS; i++) {
|
||||||
float weapon_id = mystery_box_weapons[i].weapon_id;
|
float weapon_id = mystery_box_weapons[i].weapon_id;
|
||||||
mystery_box_weapons[i].already_obtained = false;
|
|
||||||
if (Weapon_PlayerHasWeapon(player, weapon_id, true) && WepDef_OnlyOneAllowed(weapon_id)) {
|
if (Weapon_PlayerHasWeapon(player, weapon_id, true) && WepDef_OnlyOneAllowed(weapon_id)) {
|
||||||
mystery_box_weapons[i].already_obtained = true;
|
mystery_box_weapons[i].already_obtained = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue