mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Ensure that it's not possible to put fire on all objects
Only burnable objects can have a fire. Note that it's possible to re-enable the previous feature with the --restore-bugs argument. - It fixes issue #54.
This commit is contained in:
parent
d2046a9389
commit
e7dd0ec7c7
@ -382,6 +382,11 @@ CDecor::PutFloor (Point cel, Sint32 channel, Sint32 icon)
|
||||
m_decor[cel.x / 2][cel.y / 2].floorChannel = channel;
|
||||
m_decor[cel.x / 2][cel.y / 2].floorIcon = icon;
|
||||
|
||||
if (
|
||||
!g_restoreBugs && m_decor[cel.x / 2][cel.y / 2].fire &&
|
||||
!this->CanBurn (cel))
|
||||
m_decor[cel.x / 2][cel.y / 2].fire = 0;
|
||||
|
||||
m_bGroundRedraw = true;
|
||||
|
||||
//? SubDrapeau(cel); // on pourra de nouveau planter un drapeau
|
||||
@ -403,6 +408,11 @@ CDecor::PutObject (Point cel, Sint32 channel, Sint32 icon)
|
||||
m_decor[cel.x / 2][cel.y / 2].objectChannel = channel;
|
||||
m_decor[cel.x / 2][cel.y / 2].objectIcon = icon;
|
||||
|
||||
if (
|
||||
!g_restoreBugs && m_decor[cel.x / 2][cel.y / 2].fire &&
|
||||
!this->CanBurn (cel))
|
||||
m_decor[cel.x / 2][cel.y / 2].fire = 0;
|
||||
|
||||
SubDrapeau (cel); // on pourra de nouveau planter un drapeau
|
||||
|
||||
return true;
|
||||
|
@ -4419,7 +4419,8 @@ CEvent::BuildDown (Point pos, Uint16 mod, const SDL_Event * event, bool bMix)
|
||||
|
||||
if (menu == 0) // supprime ?
|
||||
m_pDecor->SetFire (cel, false);
|
||||
if (menu == 1) // ajoute ?
|
||||
|
||||
if (menu == 1 && (g_restoreBugs || m_pDecor->CanBurn (cel))) // ajoute ?
|
||||
m_pDecor->SetFire (cel, true);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user