mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-23 14:00:31 +02:00
Match actor state query leaves
This commit is contained in:
1 parent
94e753a9dd
commit
0ba30167e9
3 files changed
+68
-1
No files matched your search
@@ -368,6 +368,8 @@ struct action_state_data
|
||||
|
||||
boolean actor_action_handle_initial_action(
|
||||
long actor_index);
|
||||
boolean action_charge_is_leaping(
|
||||
long actor_index);
|
||||
boolean actor_action_handle_pending_command_list(
|
||||
long actor_index);
|
||||
boolean actor_action_handle_surprise(
|
||||
|
||||
@@ -282,6 +282,7 @@ symbols in this file:
|
||||
|
||||
#include "cseries.h"
|
||||
#include "actors.h"
|
||||
#include "props.h"
|
||||
|
||||
/* ---------- constants */
|
||||
|
||||
@@ -304,4 +305,59 @@ void actors_dispose(
|
||||
return;
|
||||
}
|
||||
|
||||
boolean actor_has_unlimited_grenades(
|
||||
long actor_index)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
boolean actor_is_noncombat(
|
||||
long actor_index)
|
||||
{
|
||||
boolean result = actor_get(actor_index)->state.mode < 3;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
boolean actor_in_combat(
|
||||
long actor_index)
|
||||
{
|
||||
struct actor_datum *actor = actor_get(actor_index);
|
||||
|
||||
if (actor->state.mode == 3 && actor->state.combat_status > actor->state.artificial_combat_status)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
boolean actor_is_leaping(
|
||||
long actor_index)
|
||||
{
|
||||
struct actor_datum *actor = actor_get(actor_index);
|
||||
boolean result = FALSE;
|
||||
|
||||
if (actor->state.action == 10)
|
||||
{
|
||||
result = action_charge_is_leaping(actor_index);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
long actor_target_unit_index(
|
||||
long actor_index)
|
||||
{
|
||||
struct actor_datum *actor = actor_get(actor_index);
|
||||
long result = NONE;
|
||||
|
||||
if (actor->target.target_prop_index != NONE)
|
||||
{
|
||||
result = prop_get(actor->target.target_prop_index)->unit_index;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* ---------- private code */
|
||||
+10
-1
@@ -780,7 +780,16 @@ void actors_dispose(
|
||||
real_argb_color const *actor_activation_debug_color(long actor_index);
|
||||
|
||||
boolean actor_get_running_blind_vector(long actor_index, real_vector3d *run_vector);
|
||||
boolean actor_has_unlimited_grenades(long actor_index);
|
||||
boolean actor_has_unlimited_grenades(
|
||||
long actor_index);
|
||||
boolean actor_is_noncombat(
|
||||
long actor_index);
|
||||
boolean actor_in_combat(
|
||||
long actor_index);
|
||||
boolean actor_is_leaping(
|
||||
long actor_index);
|
||||
long actor_target_unit_index(
|
||||
long actor_index);
|
||||
|
||||
/* ---------- prototypes/ACTOR_COMBAT.C */
|
||||
|
||||
|
||||
Reference in new issue
Block a user