diff options
author | admin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-11-06 10:23:20 +0100 |
---|---|---|
committer | admin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-11-06 10:23:20 +0100 |
commit | 36f7084e3fb4193676b14f302d0f961f2102e4ba (patch) | |
tree | b2e7d7c7d1854dbe484605b4054e707c0bd09cef /source/cMonster.cpp | |
parent | Finished most of piston class. Pistons should work when a redstone current with wire is lit up or extinguished near them but don't yet. There'sa bug to kill. (diff) | |
download | cuberite-36f7084e3fb4193676b14f302d0f961f2102e4ba.tar cuberite-36f7084e3fb4193676b14f302d0f961f2102e4ba.tar.gz cuberite-36f7084e3fb4193676b14f302d0f961f2102e4ba.tar.bz2 cuberite-36f7084e3fb4193676b14f302d0f961f2102e4ba.tar.lz cuberite-36f7084e3fb4193676b14f302d0f961f2102e4ba.tar.xz cuberite-36f7084e3fb4193676b14f302d0f961f2102e4ba.tar.zst cuberite-36f7084e3fb4193676b14f302d0f961f2102e4ba.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cMonster.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/cMonster.cpp b/source/cMonster.cpp index 99a74a86f..0eeac1409 100644 --- a/source/cMonster.cpp +++ b/source/cMonster.cpp @@ -474,22 +474,22 @@ void cMonster::InStateIdle(float a_Dt) { void cMonster::InStateBurning(float a_Dt) {
m_FireDamageInterval += a_Dt;
char block = GetWorld()->GetBlock( (int)m_Pos->x, (int)m_Pos->y, (int)m_Pos->z );
- char bblock = GetWorld()->GetBlock( (int)m_Pos->x, (int)m_Pos->y -1, (int)m_Pos->z );
+ char bblock = GetWorld()->GetBlock( (int)m_Pos->x, (int)m_Pos->y +1, (int)m_Pos->z );
if(m_FireDamageInterval > 1) {
m_FireDamageInterval = 0;
- int rem = rand()%3 + 1; //Burn most of the time
- if(rem >= 2) {
- //printf("OUCH burning!!!\n");
- TakeDamage(1, this);
- }
+ TakeDamage(1, this);
+
m_BurnPeriod++;
if(block == E_BLOCK_LAVA || block == E_BLOCK_STATIONARY_LAVA || block == E_BLOCK_FIRE
- || bblock == E_BLOCK_LAVA || bblock == E_BLOCK_STATIONARY_LAVA || bblock == E_BLOCK_FIRE)
+ || bblock == E_BLOCK_LAVA || bblock == E_BLOCK_STATIONARY_LAVA || bblock == E_BLOCK_FIRE) {
m_BurnPeriod = 0;
+ TakeDamage(6, this);
+ }else{
+ TakeDamage(1, this);
+ }
- if(m_BurnPeriod > 5) {
-
+ if(m_BurnPeriod > 8) {
cChunk* InChunk = GetWorld()->GetChunkUnreliable( m_ChunkX, m_ChunkY, m_ChunkZ );
m_EMMetaState = NORMAL;
cPacket_Metadata md(NORMAL, GetUniqueID());
|