mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #3585
3585: SUBSTRACT -> SUBTRACT r=heinrich5991 a=def- <!-- What is the motivation for the changes of this pull request --> ## 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>
This commit is contained in:
commit
07d46317fa
|
@ -127,7 +127,7 @@ void CCollision::Init(class CLayers *pLayers)
|
|||
|
||||
if(Index <= TILE_NPH_ENABLE)
|
||||
{
|
||||
if((Index >= TILE_JUMP && Index <= TILE_SUBSTRACT_TIME) || Index == TILE_ALLOW_TELE_GUN || Index == TILE_ALLOW_BLUE_TELE_GUN)
|
||||
if((Index >= TILE_JUMP && Index <= TILE_SUBTRACT_TIME) || Index == TILE_ALLOW_TELE_GUN || Index == TILE_ALLOW_BLUE_TELE_GUN)
|
||||
m_pSwitch[i].m_Type = Index;
|
||||
else
|
||||
m_pSwitch[i].m_Type = 0;
|
||||
|
|
|
@ -227,7 +227,7 @@ const char *CEditor::Explain(int Tile, int Layer)
|
|||
if(Layer == LAYER_GAME || Layer == LAYER_FRONT)
|
||||
return "HOOK OTHERS OFF: You can't hook others.";
|
||||
break;
|
||||
case TILE_SUBSTRACT_TIME:
|
||||
case TILE_SUBTRACT_TIME:
|
||||
if(Layer == LAYER_SWITCH)
|
||||
return "BONUS: Subtracts time from your current race time. Opposite of PENALTY.";
|
||||
break;
|
||||
|
|
|
@ -967,7 +967,7 @@ int CEditorMap::Load(class IStorage *pStorage, const char *pFileName, int Storag
|
|||
TILE_HIT_DISABLE,
|
||||
TILE_JUMP,
|
||||
TILE_ADD_TIME,
|
||||
TILE_SUBSTRACT_TIME,
|
||||
TILE_SUBTRACT_TIME,
|
||||
TILE_ALLOW_TELE_GUN,
|
||||
TILE_ALLOW_BLUE_TELE_GUN};
|
||||
CSwitchTile *pLayerSwitchTiles = ((CLayerSwitch *)pTiles)->m_pSwitchTile;
|
||||
|
|
|
@ -318,7 +318,7 @@ int CLayerTiles::BrushGrab(CLayerGroup *pBrush, CUIRect Rect)
|
|||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == ENTITY_LASER_SHORT + ENTITY_OFFSET ||
|
||||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_JUMP ||
|
||||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_ADD_TIME ||
|
||||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_SUBSTRACT_TIME ||
|
||||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_SUBTRACT_TIME ||
|
||||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_ALLOW_TELE_GUN ||
|
||||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_ALLOW_BLUE_TELE_GUN)
|
||||
{
|
||||
|
|
|
@ -71,7 +71,7 @@ bool IsValidSwitchTile(int Index)
|
|||
Index == TILE_HIT_DISABLE ||
|
||||
(Index >= TILE_SWITCHTIMEDOPEN && Index <= TILE_SWITCHCLOSE) ||
|
||||
Index == TILE_ADD_TIME ||
|
||||
Index == TILE_SUBSTRACT_TIME ||
|
||||
Index == TILE_SUBTRACT_TIME ||
|
||||
Index == TILE_ALLOW_TELE_GUN ||
|
||||
Index == TILE_ALLOW_BLUE_TELE_GUN ||
|
||||
IsValidEntity(Index));
|
||||
|
|
|
@ -152,7 +152,7 @@ enum
|
|||
TILE_UNLIMITED_JUMPS_DISABLE,
|
||||
TILE_JETPACK_DISABLE,
|
||||
TILE_NPH_DISABLE,
|
||||
TILE_SUBSTRACT_TIME = 95,
|
||||
TILE_SUBTRACT_TIME = 95,
|
||||
TILE_TELE_GUN_ENABLE = 96,
|
||||
TILE_TELE_GUN_DISABLE = 97,
|
||||
TILE_ALLOW_TELE_GUN = 98,
|
||||
|
|
|
@ -1840,7 +1840,7 @@ void CCharacter::HandleTiles(int Index)
|
|||
|
||||
m_LastPenalty = true;
|
||||
}
|
||||
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_SUBSTRACT_TIME && !m_LastBonus)
|
||||
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_SUBTRACT_TIME && !m_LastBonus)
|
||||
{
|
||||
int min = GameServer()->Collision()->GetSwitchDelay(MapIndex);
|
||||
int sec = GameServer()->Collision()->GetSwitchNumber(MapIndex);
|
||||
|
@ -1872,7 +1872,7 @@ void CCharacter::HandleTiles(int Index)
|
|||
m_LastPenalty = false;
|
||||
}
|
||||
|
||||
if(GameServer()->Collision()->IsSwitch(MapIndex) != TILE_SUBSTRACT_TIME)
|
||||
if(GameServer()->Collision()->IsSwitch(MapIndex) != TILE_SUBTRACT_TIME)
|
||||
{
|
||||
m_LastBonus = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue