From 36f7084e3fb4193676b14f302d0f961f2102e4ba Mon Sep 17 00:00:00 2001 From: "admin@omencraft.com" Date: Sun, 6 Nov 2011 09:23:20 +0000 Subject: Patch with diff file created by Sebi (implemented some stuff like lava physics, drops are deleted when in lava, water is now slower, lava gives actual damage etc.). Pistons now work mostly as they should. They do not yet show the motion animation and do not emit sound. They do extend, push, and retract as they should though. Right now the only way to activate a piston is to light redstone wire adjacent to it with a redstone torch. git-svn-id: http://mc-server.googlecode.com/svn/trunk@67 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cMonster.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/cMonster.cpp') 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()); -- cgit v1.2.3