3316: Disable ninja jetpack when player has telegun r=heinrich5991 a=def-

Required for map Taceht because of weapon tele interaction with jetpack

As requested by Cøke

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2020-11-19 13:06:24 +00:00 committed by GitHub
commit 797116fbfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -470,7 +470,7 @@ void CCharacter::FireWeapon()
case WEAPON_GUN:
{
if(!m_Jetpack || !m_pPlayer->m_NinjaJetpack)
if(!m_Jetpack || !m_pPlayer->m_NinjaJetpack || m_Core.m_HasTelegunGun)
{
int Lifetime;
if(!m_TuneZone)
@ -1119,7 +1119,7 @@ void CCharacter::SnapCharacter(int SnappingClient, int ID)
}
// change eyes, use ninja graphic and set ammo count if player has ninjajetpack
if(m_pPlayer->m_NinjaJetpack && m_Jetpack && m_Core.m_ActiveWeapon == WEAPON_GUN && !m_DeepFreeze && !(m_FreezeTime > 0 || m_FreezeTime == -1))
if(m_pPlayer->m_NinjaJetpack && m_Jetpack && m_Core.m_ActiveWeapon == WEAPON_GUN && !m_DeepFreeze && !(m_FreezeTime > 0 || m_FreezeTime == -1) && !m_Core.m_HasTelegunGun)
{
if(Emote == EMOTE_NORMAL)
Emote = EMOTE_HAPPY;
@ -1257,7 +1257,7 @@ void CCharacter::Snap(int SnappingClient)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_HOOK;
if(m_SuperJump)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_ENDLESS_JUMP;
if(m_Jetpack || m_NinjaJetpack)
if(m_Jetpack)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_JETPACK;
if(m_Hit & DISABLE_HIT_GRENADE)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_GRENADE_HIT;