forked from Ports/perfect_dark
Merge branch 'port' into port-debugger
This commit is contained in:
commit
e326c14760
2 files changed
+16
-2
No files matched your search
+8
-1
@@ -268,7 +268,14 @@ void botSpawn(struct chrdata *chr, u8 respawning)
|
|||||||
&& g_MpSetup.weapons[0] != MPWEAPON_SHIELD) {
|
&& g_MpSetup.weapons[0] != MPWEAPON_SHIELD) {
|
||||||
struct mpweapon *mpweapon = &g_MpWeapons[g_MpSetup.weapons[0]];
|
struct mpweapon *mpweapon = &g_MpWeapons[g_MpSetup.weapons[0]];
|
||||||
botinvGiveSingleWeapon(chr, mpweapon->weaponnum);
|
botinvGiveSingleWeapon(chr, mpweapon->weaponnum);
|
||||||
botactGiveAmmoByType(aibot, mpweapon->priammotype - 1, mpweapon->priammoqty / 2);
|
const s32 ammotype = (g_MpSetup.weapons[0] == MPWEAPON_COMBATBOOST) ? AMMOTYPE_BOOST : mpweapon->priammotype;
|
||||||
|
if (ammotype) {
|
||||||
|
s32 startammo = mpweapon->priammoqty / 2;
|
||||||
|
if (startammo == 0) {
|
||||||
|
startammo = 1;
|
||||||
|
}
|
||||||
|
botactGiveAmmoByType(aibot, ammotype, startammo);
|
||||||
|
}
|
||||||
botinvSwitchToWeapon(chr, mpweapon->weaponnum, FUNC_PRIMARY);
|
botinvSwitchToWeapon(chr, mpweapon->weaponnum, FUNC_PRIMARY);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+8
-1
@@ -1111,9 +1111,16 @@ void playerSpawn(void)
|
|||||||
&& g_MpSetup.weapons[0] != MPWEAPON_SHIELD) {
|
&& g_MpSetup.weapons[0] != MPWEAPON_SHIELD) {
|
||||||
struct mpweapon *mpweapon = &g_MpWeapons[g_MpSetup.weapons[0]];
|
struct mpweapon *mpweapon = &g_MpWeapons[g_MpSetup.weapons[0]];
|
||||||
invGiveSingleWeapon(mpweapon->weaponnum);
|
invGiveSingleWeapon(mpweapon->weaponnum);
|
||||||
|
const s32 ammotype = (g_MpSetup.weapons[0] == MPWEAPON_COMBATBOOST) ? AMMOTYPE_BOOST : mpweapon->priammotype;
|
||||||
|
if (ammotype) {
|
||||||
|
s32 startammo = mpweapon->priammoqty / 2;
|
||||||
|
if (startammo == 0) {
|
||||||
|
startammo = 1;
|
||||||
|
}
|
||||||
|
bgunSetAmmoQuantity(ammotype, startammo);
|
||||||
|
}
|
||||||
bgunEquipWeapon2(HAND_LEFT, WEAPON_NONE);
|
bgunEquipWeapon2(HAND_LEFT, WEAPON_NONE);
|
||||||
bgunEquipWeapon2(HAND_RIGHT, mpweapon->weaponnum);
|
bgunEquipWeapon2(HAND_RIGHT, mpweapon->weaponnum);
|
||||||
bgunSetAmmoQuantity(mpweapon->priammotype, mpweapon->priammoqty / 2);
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user