1
0
forked from 0ad/0ad

fix build breakage (baad!):

EventTypes.h: was missing comma. also insert onHeal string since that
array seems to depend on index values matching the enums (would be a
very insidious error!)
entity/entityorders: fix typo - ORDER_HEAL_NOTPATHING ->
ORDER_HEAL_NOPATHING
eventhandlers: was missing semicolon

This was SVN commit r3133.
This commit is contained in:
janwas 2005-11-13 23:29:56 +00:00
parent c38352703e
commit 81eec3aa10
4 changed files with 7 additions and 6 deletions

View File

@ -15,7 +15,7 @@ enum EEventType
EVENT_ATTACK,
EVENT_GATHER,
EVENT_DAMAGE,
EVENT_HEAL
EVENT_HEAL,
EVENT_TARGET_CHANGED,
EVENT_PREPARE_ORDER,
EVENT_ORDER_TRANSITION,
@ -40,6 +40,7 @@ static const wchar_t* const EventNames[EVENT_LAST] =
/* EVENT_ATTACK */ L"onAttack", /* This unit is the one doing the attacking... */
/* EVENT_GATHER */ L"onGather", /* This unit is the one doing the gathering... */
/* EVENT_DAMAGE */ L"onTakesDamage",
/* EVENT_HEAL */ L"onHeal",
/* EVENT_TARGET_CHANGED */ L"onTargetChanged", /* If this unit is selected and the mouseover object changes */
/* EVENT_PREPARE_ORDER */ L"onPrepareOrder", /* To check if a unit can execute a given order */
/* EVENT_ORDER_TRANSITION */ L"onOrderTransition" /* When we change orders (sometimes...) */

View File

@ -51,7 +51,7 @@ CEntity::CEntity( CBaseEntity* base, CVector3D position, float orientation )
AddProperty( L"actions.gather.speed", &( m_gather.m_Speed ) );
AddProperty( L"actions.heal.range", &( m_heal.m_MaxRange ) );
AddProperty( L"actions.heal.rangemin", &( m_heal.m_MinRange ) );
AddProperty( L"actions.heal.speed", &( m_hea;.m_Speed ) );
AddProperty( L"actions.heal.speed", &( m_heal.m_Speed ) );
AddProperty( L"position", &m_graphics_position, false, (NotifyFn)&CEntity::teleport );
AddProperty( L"orientation", &m_graphics_orientation, false, (NotifyFn)&CEntity::reorient );
AddProperty( L"player", &m_player );
@ -334,8 +334,8 @@ void CEntity::update( size_t timestep )
case CEntityOrder::ORDER_HEAL:
if( processHeal( current, timestep ) ) break;
return;
case CEntityOrder::ORDER_HEAL_NOTPATHING:
if( processHealNoPathing( current, timestamp ) ) break;
case CEntityOrder::ORDER_HEAL_NOPATHING:
if( processHealNoPathing( current, timestep ) ) break;
return;
case CEntityOrder::ORDER_GOTO:
if( processGoto( current, timestep ) ) break;

View File

@ -61,7 +61,7 @@ public:
ORDER_GATHER,
ORDER_GATHER_NOPATHING,
ORDER_HEAL,
ORDER_HEAL_NOTPATHING,
ORDER_HEAL_NOPATHING,
ORDER_PATH_END_MARKER,
ORDER_LAST
} m_type;

View File

@ -40,7 +40,7 @@ class CEventHeal : public CScriptEvent
CEntity* m_target;
public:
CEventHeal( CEntity* target );
}
};
class CEventDamage : public CScriptEvent
{
CEntity* m_inflictor;