Rename "NoSomething" to "SomethingDisabled"

This commit is contained in:
c0d3d3v 2022-07-08 15:31:58 +02:00
parent ebfc053809
commit e3fc71d051
No known key found for this signature in database
GPG key ID: 068AF680530DFF31
20 changed files with 245 additions and 245 deletions

View file

@ -449,7 +449,7 @@ container.sprites.Add(Sprite("hook_weak", set_strongweak, 1,0,1,1))
container.sprites.Add(Sprite("hud_airjump", set_hud, 0,0,2,2))
container.sprites.Add(Sprite("hud_airjump_empty", set_hud, 2,0,2,2))
container.sprites.Add(Sprite("hud_solo", set_hud, 4,0,2,2))
container.sprites.Add(Sprite("hud_no_collision", set_hud, 6,0,2,2))
container.sprites.Add(Sprite("hud_collision_disabled", set_hud, 6,0,2,2))
container.sprites.Add(Sprite("hud_endless_jump", set_hud, 8,0,2,2))
container.sprites.Add(Sprite("hud_endless_hook", set_hud, 10,0,2,2))
container.sprites.Add(Sprite("hud_jetpack", set_hud, 12,0,2,2))
@ -461,12 +461,12 @@ container.sprites.Add(Sprite("hud_ninja_bar_full_left", set_hud, 0,3,1,1))
container.sprites.Add(Sprite("hud_ninja_bar_full", set_hud, 1,3,1,1))
container.sprites.Add(Sprite("hud_ninja_bar_empty", set_hud, 2,3,1,1))
container.sprites.Add(Sprite("hud_ninja_bar_empty_right", set_hud, 3,3,1,1))
container.sprites.Add(Sprite("hud_no_hook_hit", set_hud, 4,2,2,2))
container.sprites.Add(Sprite("hud_no_hammer_hit", set_hud, 6,2,2,2))
container.sprites.Add(Sprite("hud_no_shotgun_hit", set_hud, 8,2,2,2))
container.sprites.Add(Sprite("hud_no_grenade_hit", set_hud, 10,2,2,2))
container.sprites.Add(Sprite("hud_no_laser_hit", set_hud, 12,2,2,2))
container.sprites.Add(Sprite("hud_no_gun_hit", set_hud, 14,2,2,2))
container.sprites.Add(Sprite("hud_hook_hit_disabled", set_hud, 4,2,2,2))
container.sprites.Add(Sprite("hud_hammer_hit_disabled", set_hud, 6,2,2,2))
container.sprites.Add(Sprite("hud_shotgun_hit_disabled", set_hud, 8,2,2,2))
container.sprites.Add(Sprite("hud_grenade_hit_disabled", set_hud, 10,2,2,2))
container.sprites.Add(Sprite("hud_laser_hit_disabled", set_hud, 12,2,2,2))
container.sprites.Add(Sprite("hud_gun_hit_disabled", set_hud, 14,2,2,2))
container.sprites.Add(Sprite("hud_deep_frozen", set_hud, 10,4,2,2))
container.sprites.Add(Sprite("hud_live_frozen", set_hud, 12,4,2,2))
container.sprites.Add(Sprite("hud_teleport_grenade", set_hud, 4,4,2,2))

View file

@ -7,11 +7,11 @@ Emotes = ["NORMAL", "PAIN", "HAPPY", "SURPRISE", "ANGRY", "BLINK"]
PlayerFlags = ["PLAYING", "IN_MENU", "CHATTING", "SCOREBOARD", "AIM"]
GameFlags = ["TEAMS", "FLAGS"]
GameStateFlags = ["GAMEOVER", "SUDDENDEATH", "PAUSED", "RACETIME"]
CharacterFlags = ["SOLO", "JETPACK", "NO_COLLISION", "ENDLESS_HOOK", "ENDLESS_JUMP", "SUPER",
"NO_HAMMER_HIT", "NO_SHOTGUN_HIT", "NO_GRENADE_HIT", "NO_LASER_HIT", "NO_HOOK",
CharacterFlags = ["SOLO", "JETPACK", "COLLISION_DISABLED", "ENDLESS_HOOK", "ENDLESS_JUMP", "SUPER",
"HAMMER_HIT_DISABLED", "SHOTGUN_HIT_DISABLED", "GRENADE_HIT_DISABLED", "LASER_HIT_DISABLED", "HOOK_HIT_DISABLED",
"TELEGUN_GUN", "TELEGUN_GRENADE", "TELEGUN_LASER",
"WEAPON_HAMMER", "WEAPON_GUN", "WEAPON_SHOTGUN", "WEAPON_GRENADE", "WEAPON_LASER", "WEAPON_NINJA",
"NO_MOVEMENTS", "IN_FREEZE", "PRACTICE_MODE"]
"MOVEMENTS_DISABLED", "IN_FREEZE", "PRACTICE_MODE"]
GameInfoFlags = [
"TIMESCORE", "GAMETYPE_RACE", "GAMETYPE_FASTCAP", "GAMETYPE_FNG",
"GAMETYPE_DDRACE", "GAMETYPE_DDNET", "GAMETYPE_BLOCK_WORLDS",

View file

@ -786,13 +786,13 @@ void CHud::PreparePlayerStateQuads()
// Quads for displaying prohibited capabilities
m_SoloOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_NoCollisionOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_NoHookHitOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_NoHammerHitOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_NoGunHitOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_NoShotgunHitOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_NoGrenadeHitOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_NoLaserHitOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_CollisionDisabledOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_HookHitDisabledOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_HammerHitDisabledOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_GunHitDisabledOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_ShotgunHitDisabledOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_GrenadeHitDisabledOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
m_LaserHitDisabledOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
// Quads for displaying freeze status
m_DeepFrozenOffset = RenderTools()->QuadContainerAddSprite(m_HudQuadContainerIndex, 0.f, 0.f, 12.f, 12.f);
@ -1040,53 +1040,53 @@ void CHud::RenderPlayerState(const int ClientID)
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_SoloOffset, x, y);
x += 12;
}
if(pCharacter->m_NoCollision)
if(pCharacter->m_CollisionDisabled)
{
HasProhibitedCapabilities = true;
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudNoCollision);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_NoCollisionOffset, x, y);
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudCollisionDisabled);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_CollisionDisabledOffset, x, y);
x += 12;
}
if(pCharacter->m_NoHookHit)
if(pCharacter->m_HookHitDisabled)
{
HasProhibitedCapabilities = true;
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudNoHookHit);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_NoHookHitOffset, x, y);
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudHookHitDisabled);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_HookHitDisabledOffset, x, y);
x += 12;
}
if(pCharacter->m_NoHammerHit)
if(pCharacter->m_HammerHitDisabled)
{
HasProhibitedCapabilities = true;
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudNoHammerHit);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_NoHammerHitOffset, x, y);
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudHammerHitDisabled);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_HammerHitDisabledOffset, x, y);
x += 12;
}
if((pCharacter->m_NoGrenadeHit && pCharacter->m_HasTelegunGun && pCharacter->m_aWeapons[WEAPON_GUN].m_Got))
if((pCharacter->m_GrenadeHitDisabled && pCharacter->m_HasTelegunGun && pCharacter->m_aWeapons[WEAPON_GUN].m_Got))
{
HasProhibitedCapabilities = true;
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudNoGunHit);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_NoLaserHitOffset, x, y);
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudGunHitDisabled);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_LaserHitDisabledOffset, x, y);
x += 12;
}
if((pCharacter->m_NoShotgunHit && pCharacter->m_aWeapons[WEAPON_SHOTGUN].m_Got))
if((pCharacter->m_ShotgunHitDisabled && pCharacter->m_aWeapons[WEAPON_SHOTGUN].m_Got))
{
HasProhibitedCapabilities = true;
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudNoShotgunHit);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_NoShotgunHitOffset, x, y);
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudShotgunHitDisabled);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_ShotgunHitDisabledOffset, x, y);
x += 12;
}
if((pCharacter->m_NoGrenadeHit && pCharacter->m_aWeapons[WEAPON_GRENADE].m_Got))
if((pCharacter->m_GrenadeHitDisabled && pCharacter->m_aWeapons[WEAPON_GRENADE].m_Got))
{
HasProhibitedCapabilities = true;
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudNoGrenadeHit);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_NoGrenadeHitOffset, x, y);
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudGrenadeHitDisabled);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_GrenadeHitDisabledOffset, x, y);
x += 12;
}
if((pCharacter->m_NoLaserHit && pCharacter->m_aWeapons[WEAPON_LASER].m_Got))
if((pCharacter->m_LaserHitDisabled && pCharacter->m_aWeapons[WEAPON_LASER].m_Got))
{
HasProhibitedCapabilities = true;
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudNoLaserHit);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_NoLaserHitOffset, x, y);
Graphics()->TextureSet(m_pClient->m_HudSkin.m_SpriteHudLaserHitDisabled);
Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, m_LaserHitDisabledOffset, x, y);
}
// render dummy actions and freeze state

View file

@ -120,13 +120,13 @@ private:
int m_TeleportGunOffset;
int m_TeleportLaserOffset;
int m_SoloOffset;
int m_NoCollisionOffset;
int m_NoHookHitOffset;
int m_NoHammerHitOffset;
int m_NoGunHitOffset;
int m_NoShotgunHitOffset;
int m_NoGrenadeHitOffset;
int m_NoLaserHitOffset;
int m_CollisionDisabledOffset;
int m_HookHitDisabledOffset;
int m_HammerHitDisabledOffset;
int m_GunHitDisabledOffset;
int m_ShotgunHitDisabledOffset;
int m_GrenadeHitDisabledOffset;
int m_LaserHitDisabledOffset;
int m_DeepFrozenOffset;
int m_LiveFrozenOffset;
int m_DummyHammerOffset;

View file

@ -1342,12 +1342,12 @@ void CGameClient::OnNewSnapshot()
// Collision
pClient->m_Solo = pCharacterData->m_Flags & CHARACTERFLAG_SOLO;
pClient->m_Jetpack = pCharacterData->m_Flags & CHARACTERFLAG_JETPACK;
pClient->m_NoCollision = pCharacterData->m_Flags & CHARACTERFLAG_NO_COLLISION;
pClient->m_NoHammerHit = pCharacterData->m_Flags & CHARACTERFLAG_NO_HAMMER_HIT;
pClient->m_NoGrenadeHit = pCharacterData->m_Flags & CHARACTERFLAG_NO_GRENADE_HIT;
pClient->m_NoLaserHit = pCharacterData->m_Flags & CHARACTERFLAG_NO_LASER_HIT;
pClient->m_NoShotgunHit = pCharacterData->m_Flags & CHARACTERFLAG_NO_SHOTGUN_HIT;
pClient->m_NoHookHit = pCharacterData->m_Flags & CHARACTERFLAG_NO_HOOK;
pClient->m_CollisionDisabled = pCharacterData->m_Flags & CHARACTERFLAG_COLLISION_DISABLED;
pClient->m_HammerHitDisabled = pCharacterData->m_Flags & CHARACTERFLAG_HAMMER_HIT_DISABLED;
pClient->m_GrenadeHitDisabled = pCharacterData->m_Flags & CHARACTERFLAG_GRENADE_HIT_DISABLED;
pClient->m_LaserHitDisabled = pCharacterData->m_Flags & CHARACTERFLAG_LASER_HIT_DISABLED;
pClient->m_ShotgunHitDisabled = pCharacterData->m_Flags & CHARACTERFLAG_SHOTGUN_HIT_DISABLED;
pClient->m_HookHitDisabled = pCharacterData->m_Flags & CHARACTERFLAG_HOOK_HIT_DISABLED;
pClient->m_Super = pCharacterData->m_Flags & CHARACTERFLAG_SUPER;
// Endless
@ -1357,7 +1357,7 @@ void CGameClient::OnNewSnapshot()
// Freeze
pClient->m_FreezeEnd = pCharacterData->m_FreezeEnd;
pClient->m_DeepFrozen = pCharacterData->m_FreezeEnd == -1;
pClient->m_LiveFrozen = (pCharacterData->m_Flags & CHARACTERFLAG_NO_MOVEMENTS) != 0;
pClient->m_LiveFrozen = (pCharacterData->m_Flags & CHARACTERFLAG_MOVEMENTS_DISABLED) != 0;
// Telegun
pClient->m_HasTelegunGrenade = pCharacterData->m_Flags & CHARACTERFLAG_TELEGUN_GRENADE;
@ -2039,14 +2039,14 @@ void CGameClient::CClientData::Reset()
m_Solo = false;
m_Jetpack = false;
m_NoCollision = false;
m_CollisionDisabled = false;
m_EndlessHook = false;
m_EndlessJump = false;
m_NoHammerHit = false;
m_NoGrenadeHit = false;
m_NoLaserHit = false;
m_NoShotgunHit = false;
m_NoHookHit = false;
m_HammerHitDisabled = false;
m_GrenadeHitDisabled = false;
m_LaserHitDisabled = false;
m_ShotgunHitDisabled = false;
m_HookHitDisabled = false;
m_Super = false;
m_HasTelegunGun = false;
m_HasTelegunGrenade = false;
@ -2228,7 +2228,7 @@ int CGameClient::IntersectCharacter(vec2 HookPos, vec2 NewPos, vec2 &NewPos2, in
bool IsOneSuper = cData.m_Super || OwnClientData.m_Super;
bool IsOneSolo = cData.m_Solo || OwnClientData.m_Solo;
if(!IsOneSuper && (!m_Teams.SameTeam(i, ownID) || IsOneSolo || OwnClientData.m_NoHookHit))
if(!IsOneSuper && (!m_Teams.SameTeam(i, ownID) || IsOneSolo || OwnClientData.m_HookHitDisabled))
continue;
vec2 ClosestPoint;
@ -3033,7 +3033,7 @@ void CGameClient::LoadHudSkin(const char *pPath, bool AsDir)
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudAirjump);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudAirjumpEmpty);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudSolo);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNoCollision);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudCollisionDisabled);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudEndlessJump);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudEndlessHook);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudJetpack);
@ -3045,12 +3045,12 @@ void CGameClient::LoadHudSkin(const char *pPath, bool AsDir)
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNinjaBarFull);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNinjaBarEmpty);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNinjaBarEmptyRight);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNoHookHit);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNoHammerHit);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNoShotgunHit);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNoGrenadeHit);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNoLaserHit);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudNoGunHit);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudHookHitDisabled);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudHammerHitDisabled);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudShotgunHitDisabled);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudGrenadeHitDisabled);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudLaserHitDisabled);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudGunHitDisabled);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudDeepFrozen);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudLiveFrozen);
Graphics()->UnloadTexture(&m_HudSkin.m_SpriteHudTeleportGrenade);
@ -3091,7 +3091,7 @@ void CGameClient::LoadHudSkin(const char *pPath, bool AsDir)
m_HudSkin.m_SpriteHudAirjump = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_AIRJUMP]);
m_HudSkin.m_SpriteHudAirjumpEmpty = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_AIRJUMP_EMPTY]);
m_HudSkin.m_SpriteHudSolo = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_SOLO]);
m_HudSkin.m_SpriteHudNoCollision = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NO_COLLISION]);
m_HudSkin.m_SpriteHudCollisionDisabled = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_COLLISION_DISABLED]);
m_HudSkin.m_SpriteHudEndlessJump = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_ENDLESS_JUMP]);
m_HudSkin.m_SpriteHudEndlessHook = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_ENDLESS_HOOK]);
m_HudSkin.m_SpriteHudJetpack = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_JETPACK]);
@ -3103,12 +3103,12 @@ void CGameClient::LoadHudSkin(const char *pPath, bool AsDir)
m_HudSkin.m_SpriteHudNinjaBarFull = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NINJA_BAR_FULL]);
m_HudSkin.m_SpriteHudNinjaBarEmpty = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NINJA_BAR_EMPTY]);
m_HudSkin.m_SpriteHudNinjaBarEmptyRight = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NINJA_BAR_EMPTY_RIGHT]);
m_HudSkin.m_SpriteHudNoHookHit = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NO_HOOK_HIT]);
m_HudSkin.m_SpriteHudNoHammerHit = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NO_HAMMER_HIT]);
m_HudSkin.m_SpriteHudNoShotgunHit = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NO_SHOTGUN_HIT]);
m_HudSkin.m_SpriteHudNoGrenadeHit = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NO_GRENADE_HIT]);
m_HudSkin.m_SpriteHudNoLaserHit = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NO_LASER_HIT]);
m_HudSkin.m_SpriteHudNoGunHit = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_NO_GUN_HIT]);
m_HudSkin.m_SpriteHudHookHitDisabled = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_HOOK_HIT_DISABLED]);
m_HudSkin.m_SpriteHudHammerHitDisabled = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_HAMMER_HIT_DISABLED]);
m_HudSkin.m_SpriteHudShotgunHitDisabled = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_SHOTGUN_HIT_DISABLED]);
m_HudSkin.m_SpriteHudGrenadeHitDisabled = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_GRENADE_HIT_DISABLED]);
m_HudSkin.m_SpriteHudLaserHitDisabled = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_LASER_HIT_DISABLED]);
m_HudSkin.m_SpriteHudGunHitDisabled = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_GUN_HIT_DISABLED]);
m_HudSkin.m_SpriteHudDeepFrozen = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_DEEP_FROZEN]);
m_HudSkin.m_SpriteHudLiveFrozen = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_LIVE_FROZEN]);
m_HudSkin.m_SpriteHudTeleportGrenade = Graphics()->LoadSpriteTexture(ImgInfo, &g_pData->m_aSprites[SPRITE_HUD_TELEPORT_GRENADE]);

View file

@ -342,14 +342,14 @@ public:
int m_EmoticonStartTick;
bool m_Solo;
bool m_Jetpack;
bool m_NoCollision;
bool m_CollisionDisabled;
bool m_EndlessHook;
bool m_EndlessJump;
bool m_NoHammerHit;
bool m_NoGrenadeHit;
bool m_NoLaserHit;
bool m_NoShotgunHit;
bool m_NoHookHit;
bool m_HammerHitDisabled;
bool m_GrenadeHitDisabled;
bool m_LaserHitDisabled;
bool m_ShotgunHitDisabled;
bool m_HookHitDisabled;
bool m_Super;
bool m_HasTelegunGun;
bool m_HasTelegunGrenade;
@ -654,7 +654,7 @@ public:
IGraphics::CTextureHandle m_SpriteHudAirjump;
IGraphics::CTextureHandle m_SpriteHudAirjumpEmpty;
IGraphics::CTextureHandle m_SpriteHudSolo;
IGraphics::CTextureHandle m_SpriteHudNoCollision;
IGraphics::CTextureHandle m_SpriteHudCollisionDisabled;
IGraphics::CTextureHandle m_SpriteHudEndlessJump;
IGraphics::CTextureHandle m_SpriteHudEndlessHook;
IGraphics::CTextureHandle m_SpriteHudJetpack;
@ -666,12 +666,12 @@ public:
IGraphics::CTextureHandle m_SpriteHudNinjaBarFull;
IGraphics::CTextureHandle m_SpriteHudNinjaBarEmpty;
IGraphics::CTextureHandle m_SpriteHudNinjaBarEmptyRight;
IGraphics::CTextureHandle m_SpriteHudNoHookHit;
IGraphics::CTextureHandle m_SpriteHudNoHammerHit;
IGraphics::CTextureHandle m_SpriteHudNoShotgunHit;
IGraphics::CTextureHandle m_SpriteHudNoGrenadeHit;
IGraphics::CTextureHandle m_SpriteHudNoLaserHit;
IGraphics::CTextureHandle m_SpriteHudNoGunHit;
IGraphics::CTextureHandle m_SpriteHudHookHitDisabled;
IGraphics::CTextureHandle m_SpriteHudHammerHitDisabled;
IGraphics::CTextureHandle m_SpriteHudShotgunHitDisabled;
IGraphics::CTextureHandle m_SpriteHudGrenadeHitDisabled;
IGraphics::CTextureHandle m_SpriteHudLaserHitDisabled;
IGraphics::CTextureHandle m_SpriteHudGunHitDisabled;
IGraphics::CTextureHandle m_SpriteHudDeepFrozen;
IGraphics::CTextureHandle m_SpriteHudLiveFrozen;
IGraphics::CTextureHandle m_SpriteHudTeleportGrenade;

View file

@ -301,7 +301,7 @@ void CCharacter::FireWeapon()
// reset objects Hit
m_NumObjectsHit = 0;
if(m_Core.m_NoHammerHit)
if(m_Core.m_HammerHitDisabled)
break;
CCharacter *apEnts[MAX_CLIENTS];
@ -752,37 +752,37 @@ void CCharacter::HandleTiles(int Index)
if(Collision()->GetSwitchNumber(MapIndex) == 0 || Switchers()[Collision()->GetSwitchNumber(MapIndex)].m_aStatus[Team()])
m_Core.m_DeepFrozen = false;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_NoHammerHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_HammerHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
{
m_Core.m_NoHammerHit = false;
m_Core.m_HammerHitDisabled = false;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !m_Core.m_NoHammerHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !m_Core.m_HammerHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
{
m_Core.m_NoHammerHit = true;
m_Core.m_HammerHitDisabled = true;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_NoShotgunHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_ShotgunHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
{
m_Core.m_NoShotgunHit = false;
m_Core.m_ShotgunHitDisabled = false;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !m_Core.m_NoShotgunHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !m_Core.m_ShotgunHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
{
m_Core.m_NoShotgunHit = true;
m_Core.m_ShotgunHitDisabled = true;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_NoGrenadeHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_GrenadeHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
{
m_Core.m_NoGrenadeHit = false;
m_Core.m_GrenadeHitDisabled = false;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !m_Core.m_NoGrenadeHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !m_Core.m_GrenadeHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
{
m_Core.m_NoGrenadeHit = true;
m_Core.m_GrenadeHitDisabled = true;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_NoLaserHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_LaserHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
{
m_Core.m_NoLaserHit = false;
m_Core.m_LaserHitDisabled = false;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !m_Core.m_NoLaserHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !m_Core.m_LaserHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
{
m_Core.m_NoLaserHit = true;
m_Core.m_LaserHitDisabled = true;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_JUMP)
{
@ -851,23 +851,23 @@ void CCharacter::HandleTiles(int Index)
}
// collide with others
if(((m_TileIndex == TILE_NPC_DISABLE) || (m_TileFIndex == TILE_NPC_DISABLE)) && !m_Core.m_NoCollision)
if(((m_TileIndex == TILE_NPC_DISABLE) || (m_TileFIndex == TILE_NPC_DISABLE)) && !m_Core.m_CollisionDisabled)
{
m_Core.m_NoCollision = true;
m_Core.m_CollisionDisabled = true;
}
else if(((m_TileIndex == TILE_NPC_ENABLE) || (m_TileFIndex == TILE_NPC_ENABLE)) && m_Core.m_NoCollision)
else if(((m_TileIndex == TILE_NPC_ENABLE) || (m_TileFIndex == TILE_NPC_ENABLE)) && m_Core.m_CollisionDisabled)
{
m_Core.m_NoCollision = false;
m_Core.m_CollisionDisabled = false;
}
// hook others
if(((m_TileIndex == TILE_NPH_DISABLE) || (m_TileFIndex == TILE_NPH_DISABLE)) && !m_Core.m_NoHookHit)
if(((m_TileIndex == TILE_NPH_DISABLE) || (m_TileFIndex == TILE_NPH_DISABLE)) && !m_Core.m_HookHitDisabled)
{
m_Core.m_NoHookHit = true;
m_Core.m_HookHitDisabled = true;
}
else if(((m_TileIndex == TILE_NPH_ENABLE) || (m_TileFIndex == TILE_NPH_ENABLE)) && m_Core.m_NoHookHit)
else if(((m_TileIndex == TILE_NPH_ENABLE) || (m_TileFIndex == TILE_NPH_ENABLE)) && m_Core.m_HookHitDisabled)
{
m_Core.m_NoHookHit = false;
m_Core.m_HookHitDisabled = false;
}
// unlimited air jumps
@ -1144,16 +1144,16 @@ void CCharacter::ResetPrediction()
SetSolo(false);
SetSuper(false);
m_Core.m_EndlessHook = false;
m_Core.m_NoHammerHit = false;
m_Core.m_NoShotgunHit = false;
m_Core.m_NoGrenadeHit = false;
m_Core.m_NoLaserHit = false;
m_Core.m_HammerHitDisabled = false;
m_Core.m_ShotgunHitDisabled = false;
m_Core.m_GrenadeHitDisabled = false;
m_Core.m_LaserHitDisabled = false;
m_Core.m_EndlessJump = false;
m_Core.m_Jetpack = false;
m_NinjaJetpack = false;
m_Core.m_Jumps = 2;
m_Core.m_NoHookHit = false;
m_Core.m_NoCollision = false;
m_Core.m_HookHitDisabled = false;
m_Core.m_CollisionDisabled = false;
m_NumInputs = 0;
m_FreezeTime = 0;
m_Core.m_FreezeStart = 0;
@ -1274,8 +1274,8 @@ void CCharacter::Read(CNetObj_Character *pChar, CNetObj_DDNetCharacter *pExtende
// set player collision
SetSolo(!Tuning()->m_PlayerCollision && !Tuning()->m_PlayerHooking);
m_Core.m_NoCollision = !Tuning()->m_PlayerCollision;
m_Core.m_NoHookHit = !Tuning()->m_PlayerHooking;
m_Core.m_CollisionDisabled = !Tuning()->m_PlayerCollision;
m_Core.m_HookHitDisabled = !Tuning()->m_PlayerHooking;
if(m_Core.m_HookTick != 0)
m_Core.m_EndlessHook = false;

View file

@ -129,10 +129,10 @@ public:
void ResetPrediction();
void SetTuneZone(int Zone);
bool CanNotHammerHit() { return m_Core.m_NoHammerHit; }
bool CanNotShotgunHit() { return m_Core.m_NoShotgunHit; }
bool CanNotLaserHit() { return m_Core.m_NoLaserHit; }
bool CanNotGrenadeHit() { return m_Core.m_NoGrenadeHit; }
bool HammerHitDisabled() { return m_Core.m_HammerHitDisabled; }
bool ShotgunHitDisabled() { return m_Core.m_ShotgunHitDisabled; }
bool LaserHitDisabled() { return m_Core.m_LaserHitDisabled; }
bool GrenadeHitDisabled() { return m_Core.m_GrenadeHitDisabled; }
bool IsSuper() { return m_Core.m_Super; }

View file

@ -35,12 +35,12 @@ bool CLaser::HitCharacter(vec2 From, vec2 To)
CCharacter *pHit;
bool DontHitSelf = (g_Config.m_SvOldLaser || !GameWorld()->m_WorldConfig.m_IsDDRace) || (m_Bounces == 0 && !m_WasTele);
if(pOwnerChar ? (!pOwnerChar->CanNotLaserHit() && m_Type == WEAPON_LASER) || (!pOwnerChar->CanNotShotgunHit() && m_Type == WEAPON_SHOTGUN) : g_Config.m_SvHit)
if(pOwnerChar ? (!pOwnerChar->LaserHitDisabled() && m_Type == WEAPON_LASER) || (!pOwnerChar->ShotgunHitDisabled() && m_Type == WEAPON_SHOTGUN) : g_Config.m_SvHit)
pHit = GameWorld()->IntersectCharacter(m_Pos, To, 0.f, At, DontHitSelf ? pOwnerChar : 0, m_Owner);
else
pHit = GameWorld()->IntersectCharacter(m_Pos, To, 0.f, At, DontHitSelf ? pOwnerChar : 0, m_Owner, pOwnerChar);
if(!pHit || (pHit == pOwnerChar && g_Config.m_SvOldLaser) || (pHit != pOwnerChar && pOwnerChar ? (pOwnerChar->CanNotLaserHit() && m_Type == WEAPON_LASER) || (pOwnerChar->CanNotShotgunHit() && m_Type == WEAPON_SHOTGUN) : !g_Config.m_SvHit))
if(!pHit || (pHit == pOwnerChar && g_Config.m_SvOldLaser) || (pHit != pOwnerChar && pOwnerChar ? (pOwnerChar->LaserHitDisabled() && m_Type == WEAPON_LASER) || (pOwnerChar->ShotgunHitDisabled() && m_Type == WEAPON_SHOTGUN) : !g_Config.m_SvHit))
return false;
m_From = From;
m_Pos = At;

View file

@ -99,7 +99,7 @@ void CProjectile::Tick()
isWeaponCollide = true;
}
if(((pTargetChr && (pOwnerChar ? !pOwnerChar->CanNotGrenadeHit() : g_Config.m_SvHit || m_Owner == -1 || pTargetChr == pOwnerChar)) || Collide || GameLayerClipped(CurPos)) && !isWeaponCollide)
if(((pTargetChr && (pOwnerChar ? !pOwnerChar->GrenadeHitDisabled() : g_Config.m_SvHit || m_Owner == -1 || pTargetChr == pOwnerChar)) || Collide || GameLayerClipped(CurPos)) && !isWeaponCollide)
{
if(m_Explosive && (!pTargetChr || (pTargetChr && (!m_Freeze || (m_Type == WEAPON_SHOTGUN && Collide)))))
{

View file

@ -346,14 +346,14 @@ void CGameWorld::CreateExplosion(vec2 Pos, int Owner, int Weapon, bool NoDamage,
float Dmg = Strength * l;
if((int)Dmg)
if((GetCharacterByID(Owner) ? !GetCharacterByID(Owner)->CanNotGrenadeHit() : g_Config.m_SvHit || NoDamage) || Owner == pChar->GetCID())
if((GetCharacterByID(Owner) ? !GetCharacterByID(Owner)->GrenadeHitDisabled() : g_Config.m_SvHit || NoDamage) || Owner == pChar->GetCID())
{
if(Owner != -1 && !pChar->CanCollide(Owner))
continue;
if(Owner == -1 && ActivatedTeam != -1 && pChar->Team() != ActivatedTeam)
continue;
pChar->TakeDamage(ForceDir * Dmg * 2, (int)Dmg, Owner, Weapon);
if(GetCharacterByID(Owner) ? GetCharacterByID(Owner)->CanNotGrenadeHit() : !g_Config.m_SvHit || NoDamage)
if(GetCharacterByID(Owner) ? GetCharacterByID(Owner)->GrenadeHitDisabled() : !g_Config.m_SvHit || NoDamage)
break;
}
}

View file

@ -93,14 +93,14 @@ void CCharacterCore::Reset()
// DDNet Character
m_Solo = false;
m_Jetpack = false;
m_NoCollision = false;
m_CollisionDisabled = false;
m_EndlessHook = false;
m_EndlessJump = false;
m_NoHammerHit = false;
m_NoGrenadeHit = false;
m_NoLaserHit = false;
m_NoShotgunHit = false;
m_NoHookHit = false;
m_HammerHitDisabled = false;
m_GrenadeHitDisabled = false;
m_LaserHitDisabled = false;
m_ShotgunHitDisabled = false;
m_HookHitDisabled = false;
m_Super = false;
m_HasTelegunGun = false;
m_HasTelegunGrenade = false;
@ -276,7 +276,7 @@ void CCharacterCore::Tick(bool UseInput)
}
// Check against other players first
if(!this->m_NoHookHit && m_pWorld && m_Tuning.m_PlayerHooking)
if(!this->m_HookHitDisabled && m_pWorld && m_Tuning.m_PlayerHooking)
{
float Distance = 0.0f;
for(int i = 0; i < MAX_CLIENTS; i++)
@ -410,7 +410,7 @@ void CCharacterCore::Tick(bool UseInput)
{
vec2 Dir = normalize(m_Pos - pCharCore->m_Pos);
bool CanCollide = (m_Super || pCharCore->m_Super) || (!m_NoCollision && !pCharCore->m_NoCollision && m_Tuning.m_PlayerCollision);
bool CanCollide = (m_Super || pCharCore->m_Super) || (!m_CollisionDisabled && !pCharCore->m_CollisionDisabled && m_Tuning.m_PlayerCollision);
if(CanCollide && Distance < PhysicalSize() * 1.25f && Distance > 0.0f)
{
@ -427,7 +427,7 @@ void CCharacterCore::Tick(bool UseInput)
}
// handle hook influence
if(!m_NoHookHit && m_HookedPlayer == i && m_Tuning.m_PlayerHooking)
if(!m_HookHitDisabled && m_HookedPlayer == i && m_Tuning.m_PlayerHooking)
{
if(Distance > PhysicalSize() * 1.50f) // TODO: fix tweakable variable
{
@ -483,7 +483,7 @@ void CCharacterCore::Move()
m_Vel.x = m_Vel.x * (1.0f / RampValue);
if(m_pWorld && (m_Super || (m_Tuning.m_PlayerCollision && !m_NoCollision && !m_Solo)))
if(m_pWorld && (m_Super || (m_Tuning.m_PlayerCollision && !m_CollisionDisabled && !m_Solo)))
{
// check player collision
float Distance = distance(m_Pos, NewPos);
@ -500,7 +500,7 @@ void CCharacterCore::Move()
CCharacterCore *pCharCore = m_pWorld->m_apCharacters[p];
if(!pCharCore || pCharCore == this)
continue;
if((!(pCharCore->m_Super || m_Super) && (m_Solo || pCharCore->m_Solo || pCharCore->m_NoCollision || (m_Id != -1 && !m_pTeams->CanCollide(m_Id, p)))))
if((!(pCharCore->m_Super || m_Super) && (m_Solo || pCharCore->m_Solo || pCharCore->m_CollisionDisabled || (m_Id != -1 && !m_pTeams->CanCollide(m_Id, p)))))
continue;
float D = distance(Pos, pCharCore->m_Pos);
if(D < PhysicalSize() && D >= 0.0f)
@ -562,12 +562,12 @@ void CCharacterCore::ReadDDNet(const CNetObj_DDNetCharacter *pObjDDNet)
// Collision
m_Solo = pObjDDNet->m_Flags & CHARACTERFLAG_SOLO;
m_Jetpack = pObjDDNet->m_Flags & CHARACTERFLAG_JETPACK;
m_NoCollision = pObjDDNet->m_Flags & CHARACTERFLAG_NO_COLLISION;
m_NoHammerHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_HAMMER_HIT;
m_NoShotgunHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_SHOTGUN_HIT;
m_NoGrenadeHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_GRENADE_HIT;
m_NoLaserHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_LASER_HIT;
m_NoHookHit = pObjDDNet->m_Flags & CHARACTERFLAG_NO_HOOK;
m_CollisionDisabled = pObjDDNet->m_Flags & CHARACTERFLAG_COLLISION_DISABLED;
m_HammerHitDisabled = pObjDDNet->m_Flags & CHARACTERFLAG_HAMMER_HIT_DISABLED;
m_ShotgunHitDisabled = pObjDDNet->m_Flags & CHARACTERFLAG_SHOTGUN_HIT_DISABLED;
m_GrenadeHitDisabled = pObjDDNet->m_Flags & CHARACTERFLAG_GRENADE_HIT_DISABLED;
m_LaserHitDisabled = pObjDDNet->m_Flags & CHARACTERFLAG_LASER_HIT_DISABLED;
m_HookHitDisabled = pObjDDNet->m_Flags & CHARACTERFLAG_HOOK_HIT_DISABLED;
m_Super = pObjDDNet->m_Flags & CHARACTERFLAG_SUPER;
// Endless
@ -577,7 +577,7 @@ void CCharacterCore::ReadDDNet(const CNetObj_DDNetCharacter *pObjDDNet)
// Freeze
m_FreezeEnd = pObjDDNet->m_FreezeEnd;
m_DeepFrozen = pObjDDNet->m_FreezeEnd == -1;
m_LiveFrozen = (pObjDDNet->m_Flags & CHARACTERFLAG_NO_MOVEMENTS) != 0;
m_LiveFrozen = (pObjDDNet->m_Flags & CHARACTERFLAG_MOVEMENTS_DISABLED) != 0;
// Telegun
m_HasTelegunGrenade = pObjDDNet->m_Flags & CHARACTERFLAG_TELEGUN_GRENADE;

View file

@ -291,14 +291,14 @@ public:
void ReadDDNet(const CNetObj_DDNetCharacter *pObjDDNet);
bool m_Solo;
bool m_Jetpack;
bool m_NoCollision;
bool m_CollisionDisabled;
bool m_EndlessHook;
bool m_EndlessJump;
bool m_NoHammerHit;
bool m_NoGrenadeHit;
bool m_NoLaserHit;
bool m_NoShotgunHit;
bool m_NoHookHit;
bool m_HammerHitDisabled;
bool m_GrenadeHitDisabled;
bool m_LaserHitDisabled;
bool m_ShotgunHitDisabled;
bool m_HookHitDisabled;
bool m_Super;
bool m_HasTelegunGun;
bool m_HasTelegunGrenade;

View file

@ -439,7 +439,7 @@ void CCharacter::FireWeapon()
Antibot()->OnHammerFire(m_pPlayer->GetCID());
if(m_Core.m_NoHammerHit)
if(m_Core.m_HammerHitDisabled)
break;
CCharacter *apEnts[MAX_CLIENTS];
@ -1154,22 +1154,22 @@ void CCharacter::Snap(int SnappingClient)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_SUPER;
if(m_Core.m_EndlessHook)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_ENDLESS_HOOK;
if(m_Core.m_NoCollision || !GameServer()->Tuning()->m_PlayerCollision)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_COLLISION;
if(m_Core.m_NoHookHit || !GameServer()->Tuning()->m_PlayerHooking)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_HOOK;
if(m_Core.m_CollisionDisabled || !GameServer()->Tuning()->m_PlayerCollision)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_COLLISION_DISABLED;
if(m_Core.m_HookHitDisabled || !GameServer()->Tuning()->m_PlayerHooking)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_HOOK_HIT_DISABLED;
if(m_Core.m_EndlessJump)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_ENDLESS_JUMP;
if(m_Core.m_Jetpack)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_JETPACK;
if(m_Core.m_NoHammerHit)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_HAMMER_HIT;
if(m_Core.m_NoShotgunHit)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_SHOTGUN_HIT;
if(m_Core.m_NoGrenadeHit)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_GRENADE_HIT;
if(m_Core.m_NoLaserHit)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_LASER_HIT;
if(m_Core.m_HammerHitDisabled)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_HAMMER_HIT_DISABLED;
if(m_Core.m_ShotgunHitDisabled)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_SHOTGUN_HIT_DISABLED;
if(m_Core.m_GrenadeHitDisabled)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_GRENADE_HIT_DISABLED;
if(m_Core.m_LaserHitDisabled)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_LASER_HIT_DISABLED;
if(m_Core.m_HasTelegunGun)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_TELEGUN_GUN;
if(m_Core.m_HasTelegunGrenade)
@ -1189,7 +1189,7 @@ void CCharacter::Snap(int SnappingClient)
if(m_Core.m_ActiveWeapon == WEAPON_NINJA)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_WEAPON_NINJA;
if(m_Core.m_LiveFrozen)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_MOVEMENTS;
pDDNetCharacter->m_Flags |= CHARACTERFLAG_MOVEMENTS_DISABLED;
pDDNetCharacter->m_FreezeEnd = m_Core.m_DeepFrozen ? -1 : m_FreezeTime == 0 ? 0 : Server()->Tick() + m_FreezeTime;
pDDNetCharacter->m_Jumps = m_Core.m_Jumps;
@ -1450,55 +1450,55 @@ void CCharacter::HandleTiles(int Index)
}
// hit others
if(((m_TileIndex == TILE_HIT_DISABLE) || (m_TileFIndex == TILE_HIT_DISABLE)) && (!m_Core.m_NoHammerHit || !m_Core.m_NoShotgunHit || !m_Core.m_NoGrenadeHit || !m_Core.m_NoLaserHit))
if(((m_TileIndex == TILE_HIT_DISABLE) || (m_TileFIndex == TILE_HIT_DISABLE)) && (!m_Core.m_HammerHitDisabled || !m_Core.m_ShotgunHitDisabled || !m_Core.m_GrenadeHitDisabled || !m_Core.m_LaserHitDisabled))
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hit others");
m_Core.m_NoHammerHit = true;
m_Core.m_NoShotgunHit = true;
m_Core.m_NoGrenadeHit = true;
m_Core.m_NoLaserHit = true;
m_Core.m_HammerHitDisabled = true;
m_Core.m_ShotgunHitDisabled = true;
m_Core.m_GrenadeHitDisabled = true;
m_Core.m_LaserHitDisabled = true;
m_NeededFaketuning |= FAKETUNE_NOHAMMER;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
else if(((m_TileIndex == TILE_HIT_ENABLE) || (m_TileFIndex == TILE_HIT_ENABLE)) && (m_Core.m_NoHammerHit || m_Core.m_NoShotgunHit || m_Core.m_NoGrenadeHit || m_Core.m_NoLaserHit))
else if(((m_TileIndex == TILE_HIT_ENABLE) || (m_TileFIndex == TILE_HIT_ENABLE)) && (m_Core.m_HammerHitDisabled || m_Core.m_ShotgunHitDisabled || m_Core.m_GrenadeHitDisabled || m_Core.m_LaserHitDisabled))
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can hit others");
m_Core.m_NoShotgunHit = false;
m_Core.m_NoGrenadeHit = false;
m_Core.m_NoHammerHit = false;
m_Core.m_NoLaserHit = false;
m_Core.m_ShotgunHitDisabled = false;
m_Core.m_GrenadeHitDisabled = false;
m_Core.m_HammerHitDisabled = false;
m_Core.m_LaserHitDisabled = false;
m_NeededFaketuning &= ~FAKETUNE_NOHAMMER;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
// collide with others
if(((m_TileIndex == TILE_NPC_DISABLE) || (m_TileFIndex == TILE_NPC_DISABLE)) && !m_Core.m_NoCollision)
if(((m_TileIndex == TILE_NPC_DISABLE) || (m_TileFIndex == TILE_NPC_DISABLE)) && !m_Core.m_CollisionDisabled)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't collide with others");
m_Core.m_NoCollision = true;
m_Core.m_CollisionDisabled = true;
m_NeededFaketuning |= FAKETUNE_NOCOLL;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
else if(((m_TileIndex == TILE_NPC_ENABLE) || (m_TileFIndex == TILE_NPC_ENABLE)) && m_Core.m_NoCollision)
else if(((m_TileIndex == TILE_NPC_ENABLE) || (m_TileFIndex == TILE_NPC_ENABLE)) && m_Core.m_CollisionDisabled)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can collide with others");
m_Core.m_NoCollision = false;
m_Core.m_CollisionDisabled = false;
m_NeededFaketuning &= ~FAKETUNE_NOCOLL;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
// hook others
if(((m_TileIndex == TILE_NPH_DISABLE) || (m_TileFIndex == TILE_NPH_DISABLE)) && !m_Core.m_NoHookHit)
if(((m_TileIndex == TILE_NPH_DISABLE) || (m_TileFIndex == TILE_NPH_DISABLE)) && !m_Core.m_HookHitDisabled)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hook others");
m_Core.m_NoHookHit = true;
m_Core.m_HookHitDisabled = true;
m_NeededFaketuning |= FAKETUNE_NOHOOK;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
else if(((m_TileIndex == TILE_NPH_ENABLE) || (m_TileFIndex == TILE_NPH_ENABLE)) && m_Core.m_NoHookHit)
else if(((m_TileIndex == TILE_NPH_ENABLE) || (m_TileFIndex == TILE_NPH_ENABLE)) && m_Core.m_HookHitDisabled)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can hook others");
m_Core.m_NoHookHit = false;
m_Core.m_HookHitDisabled = false;
m_NeededFaketuning &= ~FAKETUNE_NOHOOK;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
@ -1668,49 +1668,49 @@ void CCharacter::HandleTiles(int Index)
m_Core.m_LiveFrozen = false;
}
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_NoHammerHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_HammerHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can hammer hit others");
m_NeededFaketuning &= ~FAKETUNE_NOHAMMER;
m_Core.m_NoHammerHit = false;
m_Core.m_HammerHitDisabled = false;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Core.m_NoHammerHit) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Core.m_HammerHitDisabled) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hammer hit others");
m_NeededFaketuning |= FAKETUNE_NOHAMMER;
m_Core.m_NoHammerHit = true;
m_Core.m_HammerHitDisabled = true;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_NoShotgunHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_ShotgunHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can shoot others with shotgun");
m_Core.m_NoShotgunHit = false;
m_Core.m_ShotgunHitDisabled = false;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Core.m_NoShotgunHit) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Core.m_ShotgunHitDisabled) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't shoot others with shotgun");
m_Core.m_NoShotgunHit = true;
m_Core.m_ShotgunHitDisabled = true;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_NoGrenadeHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_GrenadeHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can shoot others with grenade");
m_Core.m_NoGrenadeHit = false;
m_Core.m_GrenadeHitDisabled = false;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Core.m_NoGrenadeHit) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Core.m_GrenadeHitDisabled) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't shoot others with grenade");
m_Core.m_NoGrenadeHit = true;
m_Core.m_GrenadeHitDisabled = true;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_NoLaserHit && Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Core.m_LaserHitDisabled && Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can shoot others with laser");
m_Core.m_NoLaserHit = false;
m_Core.m_LaserHitDisabled = false;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Core.m_NoLaserHit) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Core.m_LaserHitDisabled) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't shoot others with laser");
m_Core.m_NoLaserHit = true;
m_Core.m_LaserHitDisabled = true;
}
else if(Collision()->GetSwitchType(MapIndex) == TILE_JUMP)
{
@ -2247,17 +2247,17 @@ void CCharacter::DDRaceInit()
m_Core.m_EndlessHook = g_Config.m_SvEndlessDrag;
if(g_Config.m_SvHit)
{
m_Core.m_NoHammerHit = false;
m_Core.m_NoShotgunHit = false;
m_Core.m_NoGrenadeHit = false;
m_Core.m_NoLaserHit = false;
m_Core.m_HammerHitDisabled = false;
m_Core.m_ShotgunHitDisabled = false;
m_Core.m_GrenadeHitDisabled = false;
m_Core.m_LaserHitDisabled = false;
}
else
{
m_Core.m_NoHammerHit = true;
m_Core.m_NoShotgunHit = true;
m_Core.m_NoGrenadeHit = true;
m_Core.m_NoLaserHit = true;
m_Core.m_HammerHitDisabled = true;
m_Core.m_ShotgunHitDisabled = true;
m_Core.m_GrenadeHitDisabled = true;
m_Core.m_LaserHitDisabled = true;
}
m_Core.m_Jumps = 2;
m_FreezeHammer = false;

View file

@ -241,10 +241,10 @@ public:
bool HasTelegunGrenade() { return m_Core.m_HasTelegunGrenade; }
bool HasTelegunLaser() { return m_Core.m_HasTelegunLaser; }
bool CanNotHammerHit() { return m_Core.m_NoHammerHit; }
bool CanNotShotgunHit() { return m_Core.m_NoShotgunHit; }
bool CanNotLaserHit() { return m_Core.m_NoLaserHit; }
bool CanNotGrenadeHit() { return m_Core.m_NoGrenadeHit; }
bool HammerHitDisabled() { return m_Core.m_HammerHitDisabled; }
bool ShotgunHitDisabled() { return m_Core.m_ShotgunHitDisabled; }
bool LaserHitDisabled() { return m_Core.m_LaserHitDisabled; }
bool GrenadeHitDisabled() { return m_Core.m_GrenadeHitDisabled; }
bool IsSuper() { return m_Core.m_Super; }

View file

@ -42,12 +42,12 @@ bool CLaser::HitCharacter(vec2 From, vec2 To)
CCharacter *pHit;
bool pDontHitSelf = g_Config.m_SvOldLaser || (m_Bounces == 0 && !m_WasTele);
if(pOwnerChar ? (!pOwnerChar->CanNotLaserHit() && m_Type == WEAPON_LASER) || (!pOwnerChar->CanNotShotgunHit() && m_Type == WEAPON_SHOTGUN) : g_Config.m_SvHit)
if(pOwnerChar ? (!pOwnerChar->LaserHitDisabled() && m_Type == WEAPON_LASER) || (!pOwnerChar->ShotgunHitDisabled() && m_Type == WEAPON_SHOTGUN) : g_Config.m_SvHit)
pHit = GameServer()->m_World.IntersectCharacter(m_Pos, To, 0.f, At, pDontHitSelf ? pOwnerChar : 0, m_Owner);
else
pHit = GameServer()->m_World.IntersectCharacter(m_Pos, To, 0.f, At, pDontHitSelf ? pOwnerChar : 0, m_Owner, pOwnerChar);
if(!pHit || (pHit == pOwnerChar && g_Config.m_SvOldLaser) || (pHit != pOwnerChar && pOwnerChar ? (pOwnerChar->CanNotLaserHit() && m_Type == WEAPON_LASER) || (pOwnerChar->CanNotShotgunHit() && m_Type == WEAPON_SHOTGUN) : !g_Config.m_SvHit))
if(!pHit || (pHit == pOwnerChar && g_Config.m_SvOldLaser) || (pHit != pOwnerChar && pOwnerChar ? (pOwnerChar->LaserHitDisabled() && m_Type == WEAPON_LASER) || (pOwnerChar->ShotgunHitDisabled() && m_Type == WEAPON_SHOTGUN) : !g_Config.m_SvHit))
return false;
m_From = From;
m_Pos = At;
@ -210,7 +210,7 @@ void CLaser::DoBounce()
bool pDontHitSelf = g_Config.m_SvOldLaser || (m_Bounces == 0 && !m_WasTele);
vec2 At;
CCharacter *pHit;
if(pOwnerChar ? (!pOwnerChar->CanNotLaserHit() && m_Type == WEAPON_LASER) : g_Config.m_SvHit)
if(pOwnerChar ? (!pOwnerChar->LaserHitDisabled() && m_Type == WEAPON_LASER) : g_Config.m_SvHit)
pHit = GameServer()->m_World.IntersectCharacter(m_Pos, To, 0.f, At, pDontHitSelf ? pOwnerChar : 0, m_Owner);
else
pHit = GameServer()->m_World.IntersectCharacter(m_Pos, To, 0.f, At, pDontHitSelf ? pOwnerChar : 0, m_Owner, pOwnerChar);

View file

@ -124,7 +124,7 @@ void CProjectile::Tick()
CCharacter *pTargetChr = 0;
if(pOwnerChar ? !pOwnerChar->CanNotGrenadeHit() : g_Config.m_SvHit)
if(pOwnerChar ? !pOwnerChar->GrenadeHitDisabled() : g_Config.m_SvHit)
pTargetChr = GameServer()->m_World.IntersectCharacter(PrevPos, ColPos, m_Freeze ? 1.0f : 6.0f, ColPos, pOwnerChar, m_Owner);
if(m_LifeSpan > -1)
@ -151,7 +151,7 @@ void CProjectile::Tick()
return;
}
if(((pTargetChr && (pOwnerChar ? !pOwnerChar->CanNotGrenadeHit() : g_Config.m_SvHit || m_Owner == -1 || pTargetChr == pOwnerChar)) || Collide || GameLayerClipped(CurPos)) && !IsWeaponCollide)
if(((pTargetChr && (pOwnerChar ? !pOwnerChar->GrenadeHitDisabled() : g_Config.m_SvHit || m_Owner == -1 || pTargetChr == pOwnerChar)) || Collide || GameLayerClipped(CurPos)) && !IsWeaponCollide)
{
if(m_Explosive /*??*/ && (!pTargetChr || (pTargetChr && (!m_Freeze || (m_Type == WEAPON_SHOTGUN && Collide)))))
{

View file

@ -291,7 +291,7 @@ void CGameContext::CreateExplosion(vec2 Pos, int Owner, int Weapon, bool NoDamag
if(!(int)Dmg)
continue;
if((GetPlayerChar(Owner) ? !GetPlayerChar(Owner)->CanNotGrenadeHit() : g_Config.m_SvHit) || NoDamage || Owner == apEnts[i]->GetPlayer()->GetCID())
if((GetPlayerChar(Owner) ? !GetPlayerChar(Owner)->GrenadeHitDisabled() : g_Config.m_SvHit) || NoDamage || Owner == apEnts[i]->GetPlayer()->GetCID())
{
if(Owner != -1 && apEnts[i]->IsAlive() && !apEnts[i]->CanCollide(Owner))
continue;
@ -300,7 +300,7 @@ void CGameContext::CreateExplosion(vec2 Pos, int Owner, int Weapon, bool NoDamag
// Explode at most once per team
int PlayerTeam = apEnts[i]->Team();
if((GetPlayerChar(Owner) ? GetPlayerChar(Owner)->CanNotGrenadeHit() : !g_Config.m_SvHit) || NoDamage)
if((GetPlayerChar(Owner) ? GetPlayerChar(Owner)->GrenadeHitDisabled() : !g_Config.m_SvHit) || NoDamage)
{
if(!CmaskIsSet(TeamMask, PlayerTeam))
continue;

View file

@ -45,15 +45,15 @@ void CSaveTee::Save(CCharacter *pChr)
m_EndlessHook = pChr->m_Core.m_EndlessHook;
m_DDRaceState = pChr->m_DDRaceState;
m_NoHitFlags = 0;
if(pChr->m_Core.m_NoHammerHit)
m_NoHitFlags |= CSaveTee::DISABLE_HIT_HAMMER;
if(pChr->m_Core.m_NoShotgunHit)
m_NoHitFlags |= CSaveTee::DISABLE_HIT_SHOTGUN;
if(pChr->m_Core.m_NoGrenadeHit)
m_NoHitFlags |= CSaveTee::DISABLE_HIT_GRENADE;
if(pChr->m_Core.m_NoLaserHit)
m_NoHitFlags |= CSaveTee::DISABLE_HIT_LASER;
m_HitDisabledFlags = 0;
if(pChr->m_Core.m_HammerHitDisabled)
m_HitDisabledFlags |= CSaveTee::HAMMER_HIT_DISABLED;
if(pChr->m_Core.m_ShotgunHitDisabled)
m_HitDisabledFlags |= CSaveTee::SHOTGUN_HIT_DISABLED;
if(pChr->m_Core.m_GrenadeHitDisabled)
m_HitDisabledFlags |= CSaveTee::GRENADE_HIT_DISABLED;
if(pChr->m_Core.m_LaserHitDisabled)
m_HitDisabledFlags |= CSaveTee::LASER_HIT_DISABLED;
m_TuneZone = pChr->m_TuneZone;
m_TuneZoneOld = pChr->m_TuneZoneOld;
@ -86,8 +86,8 @@ void CSaveTee::Save(CCharacter *pChr)
// Core
m_CorePos = pChr->m_Core.m_Pos;
m_Vel = pChr->m_Core.m_Vel;
m_Hook = !pChr->m_Core.m_NoHookHit;
m_Collision = !pChr->m_Core.m_NoCollision;
m_HookHitEnabled = !pChr->m_Core.m_HookHitDisabled;
m_CollisionEnabled = !pChr->m_Core.m_CollisionDisabled;
m_ActiveWeapon = pChr->m_Core.m_ActiveWeapon;
m_Jumped = pChr->m_Core.m_Jumped;
m_JumpedTotal = pChr->m_Core.m_JumpedTotal;
@ -149,10 +149,10 @@ void CSaveTee::Load(CCharacter *pChr, int Team, bool IsSwap)
pChr->m_Core.m_EndlessHook = m_EndlessHook;
pChr->m_DDRaceState = m_DDRaceState;
pChr->m_Core.m_NoHammerHit = m_NoHitFlags & CSaveTee::DISABLE_HIT_HAMMER;
pChr->m_Core.m_NoShotgunHit = m_NoHitFlags & CSaveTee::DISABLE_HIT_SHOTGUN;
pChr->m_Core.m_NoGrenadeHit = m_NoHitFlags & CSaveTee::DISABLE_HIT_GRENADE;
pChr->m_Core.m_NoLaserHit = m_NoHitFlags & CSaveTee::DISABLE_HIT_LASER;
pChr->m_Core.m_HammerHitDisabled = m_HitDisabledFlags & CSaveTee::HAMMER_HIT_DISABLED;
pChr->m_Core.m_ShotgunHitDisabled = m_HitDisabledFlags & CSaveTee::SHOTGUN_HIT_DISABLED;
pChr->m_Core.m_GrenadeHitDisabled = m_HitDisabledFlags & CSaveTee::GRENADE_HIT_DISABLED;
pChr->m_Core.m_LaserHitDisabled = m_HitDisabledFlags & CSaveTee::LASER_HIT_DISABLED;
pChr->m_TuneZone = m_TuneZone;
pChr->m_TuneZoneOld = m_TuneZoneOld;
@ -183,8 +183,8 @@ void CSaveTee::Load(CCharacter *pChr, int Team, bool IsSwap)
// Core
pChr->m_Core.m_Pos = m_CorePos;
pChr->m_Core.m_Vel = m_Vel;
pChr->m_Core.m_NoHookHit = !m_Hook;
pChr->m_Core.m_NoCollision = !m_Collision;
pChr->m_Core.m_HookHitDisabled = !m_HookHitEnabled;
pChr->m_Core.m_CollisionDisabled = !m_CollisionEnabled;
pChr->m_Core.m_ActiveWeapon = m_ActiveWeapon;
pChr->m_Core.m_Jumped = m_Jumped;
pChr->m_Core.m_JumpedTotal = m_JumpedTotal;
@ -283,7 +283,7 @@ char *CSaveTee::GetString(const CSaveTeam *pTeam)
m_LastWeapon, m_QueuedWeapon,
// tee states
m_EndlessJump, m_Jetpack, m_NinjaJetpack, m_FreezeTime, m_FreezeStart, m_DeepFrozen, m_EndlessHook,
m_DDRaceState, m_NoHitFlags, m_Collision, m_TuneZone, m_TuneZoneOld, m_Hook, m_Time,
m_DDRaceState, m_HitDisabledFlags, m_CollisionEnabled, m_TuneZone, m_TuneZoneOld, m_HookHitEnabled, m_Time,
(int)m_Pos.x, (int)m_Pos.y, (int)m_PrevPos.x, (int)m_PrevPos.y,
m_TeleCheckpoint, m_LastPenalty,
(int)m_CorePos.x, (int)m_CorePos.y, m_Vel.x, m_Vel.y,
@ -356,7 +356,7 @@ int CSaveTee::FromString(const char *pString)
&m_LastWeapon, &m_QueuedWeapon,
// tee states
&m_EndlessJump, &m_Jetpack, &m_NinjaJetpack, &m_FreezeTime, &m_FreezeStart, &m_DeepFrozen, &m_EndlessHook,
&m_DDRaceState, &m_NoHitFlags, &m_Collision, &m_TuneZone, &m_TuneZoneOld, &m_Hook, &m_Time,
&m_DDRaceState, &m_HitDisabledFlags, &m_CollisionEnabled, &m_TuneZone, &m_TuneZoneOld, &m_HookHitEnabled, &m_Time,
&m_Pos.x, &m_Pos.y, &m_PrevPos.x, &m_PrevPos.y,
&m_TeleCheckpoint, &m_LastPenalty,
&m_CorePos.x, &m_CorePos.y, &m_Vel.x, &m_Vel.y,

View file

@ -30,10 +30,10 @@ public:
enum
{
HIT_ALL = 0,
DISABLE_HIT_HAMMER = 1,
DISABLE_HIT_SHOTGUN = 2,
DISABLE_HIT_GRENADE = 4,
DISABLE_HIT_LASER = 8
HAMMER_HIT_DISABLED = 1,
SHOTGUN_HIT_DISABLED = 2,
GRENADE_HIT_DISABLED = 4,
LASER_HIT_DISABLED = 8
};
private:
@ -72,11 +72,11 @@ private:
int m_EndlessHook;
int m_DDRaceState;
int m_NoHitFlags;
int m_Collision;
int m_HitDisabledFlags;
int m_CollisionEnabled;
int m_TuneZone;
int m_TuneZoneOld;
int m_Hook;
int m_HookHitEnabled;
int m_Time;
vec2 m_Pos;
vec2 m_PrevPos;