Shrapnel now configurable
This commit is contained in:
parent
53231bebd6
commit
462829e23d
@ -1832,7 +1832,7 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
|
||||
Handler->ConvertToPickups(Drops, area.GetBlockMeta(bx + x, by + y, bz + z)); // Stone becomes cobblestone, coal ore becomes coal, etc.
|
||||
m_World->SpawnItemPickups(Drops, bx + x, by + y, bz + z);
|
||||
}
|
||||
else if (m_World->GetTickRandomNumber(100) < 20) // 20% chance of flinging stuff around
|
||||
else if (m_World->IsTNTShrapnelEnabled() && (m_World->GetTickRandomNumber(100) < 20)) // 20% chance of flinging stuff around
|
||||
{
|
||||
if (!cBlockInfo::FullyOccupiesVoxel(area.GetBlockType(bx + x, by + y, bz + z)))
|
||||
{
|
||||
|
@ -250,8 +250,6 @@ cWorld::cWorld(const AString & a_WorldName) :
|
||||
m_SkyDarkness(0),
|
||||
m_Weather(eWeather_Sunny),
|
||||
m_WeatherInterval(24000), // Guaranteed 1 day of sunshine at server start :)
|
||||
m_bCommandBlocksEnabled(false),
|
||||
m_bUseChatPrefixes(true),
|
||||
m_Scoreboard(this),
|
||||
m_MapManager(this),
|
||||
m_GeneratorCallbacks(*this),
|
||||
@ -554,6 +552,7 @@ void cWorld::Start(void)
|
||||
m_IsSugarcaneBonemealable = IniFile.GetValueSetB("Plants", "IsSugarcaneBonemealable", false);
|
||||
m_IsDeepSnowEnabled = IniFile.GetValueSetB("Physics", "DeepSnow", true);
|
||||
m_ShouldLavaSpawnFire = IniFile.GetValueSetB("Physics", "ShouldLavaSpawnFire", true);
|
||||
m_bTNTSpawnsShrapnel = IniFile.GetValueSetB("Physics", "IsTNTShrapnelEnabled", true);
|
||||
m_bCommandBlocksEnabled = IniFile.GetValueSetB("Mechanics", "CommandBlocksEnabled", false);
|
||||
m_bEnabledPVP = IniFile.GetValueSetB("Mechanics", "PVPEnabled", true);
|
||||
m_bUseChatPrefixes = IniFile.GetValueSetB("Mechanics", "UseChatPrefixes", true);
|
||||
|
@ -590,6 +590,9 @@ public:
|
||||
bool AreCommandBlocksEnabled(void) const { return m_bCommandBlocksEnabled; }
|
||||
void SetCommandBlocksEnabled(bool a_Flag) { m_bCommandBlocksEnabled = a_Flag; }
|
||||
|
||||
bool IsTNTShrapnelEnabled(void) const { return m_bTNTSpawnsShrapnel; }
|
||||
void SetTNTShrapnelEnabled(bool a_Flag) { m_bTNTSpawnsShrapnel = a_Flag; }
|
||||
|
||||
bool ShouldUseChatPrefixes(void) const { return m_bUseChatPrefixes; }
|
||||
void SetShouldUseChatPrefixes(bool a_Flag) { m_bUseChatPrefixes = a_Flag; }
|
||||
|
||||
@ -847,6 +850,9 @@ private:
|
||||
|
||||
/** Whether prefixes such as [INFO] are prepended to SendMessageXXX() / BroadcastChatXXX() functions */
|
||||
bool m_bUseChatPrefixes;
|
||||
|
||||
/** Whether TNT explosions, done via cWorld::DoExplosionAt(), should project random affected blocks as FallingBlock entities */
|
||||
bool m_bTNTSpawnsShrapnel;
|
||||
|
||||
|
||||
cChunkGenerator m_Generator;
|
||||
|
Loading…
x
Reference in New Issue
Block a user