mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-24 06:00:31 +02:00
157 lines
3.2 KiB
C
157 lines
3.2 KiB
C
/*
|
|
ACTION_CHARGE.C
|
|
|
|
symbols in this file:
|
|
00001080 0050:
|
|
_action_charge_begin (0000)
|
|
000010D0 0110:
|
|
_code_000010d0 (0000)
|
|
000011E0 0050:
|
|
_action_charge_update (0000)
|
|
00001230 0220:
|
|
_action_charge_control (0000)
|
|
00001450 0050:
|
|
_action_charge_is_leaping (0000)
|
|
000014A0 0010:
|
|
_square_root (0000)
|
|
000014B0 0020:
|
|
_scale_vector2d (0000)
|
|
000014D0 0020:
|
|
_magnitude_squared2d (0000)
|
|
000014F0 0020:
|
|
_magnitude2d (0000)
|
|
00001510 0050:
|
|
_normalize2d (0000)
|
|
00001560 0020:
|
|
_dot_product2d (0000)
|
|
00001580 0030:
|
|
_point_from_line3d (0000)
|
|
000015B0 0030:
|
|
_scale_vector3d (0000)
|
|
000015E0 0030:
|
|
_magnitude3d (0000)
|
|
00001610 0060:
|
|
_normalize3d (0000)
|
|
00001670 0020:
|
|
_dot_product3d (0000)
|
|
00001690 0030:
|
|
_subtract_vectors3d (0000)
|
|
000016C0 0010:
|
|
_real_random (0000)
|
|
000016D0 0050:
|
|
_collision_test_line (0000)
|
|
00001720 0cb0:
|
|
_action_charge_perform (0000)
|
|
000023D0 0120:
|
|
_code_000023d0 (0000)
|
|
000024F0 03b0:
|
|
_action_charge_setup (0000)
|
|
00242F60 0004:
|
|
__real@00000000 (0000)
|
|
00242F64 0004:
|
|
__real@3f333333 (0000)
|
|
00242F68 0004:
|
|
__real@3f800000 (0000)
|
|
00242F70 0008:
|
|
__real@3f1a36e2e0000000 (0000)
|
|
00242F78 0004:
|
|
__real@40800000 (0000)
|
|
00242F7C 0004:
|
|
__real@3f5db3d7 (0000)
|
|
00242F80 0004:
|
|
__real@3cbf258c (0000)
|
|
00242F84 0004:
|
|
__real@3e99999a (0000)
|
|
00242F88 0004:
|
|
__real@3d4ccccd (0000)
|
|
00242F8C 0004:
|
|
__real@3fc00000 (0000)
|
|
00242F90 0004:
|
|
__real@3f4ccccd (0000)
|
|
00242F94 0022:
|
|
??_C@_0CC@DPKBMBNB@c?3?2halo?2SOURCE?2ai?2action_charge?4@ (0000)
|
|
00242FB8 0028:
|
|
??_C@_0CI@OJMAHDFE@global_current_collision_user_de@ (0000)
|
|
00242FE0 0049:
|
|
??_C@_0EJ@EEKGOMEC@global_current_collision_user_de@ (0000)
|
|
0024302C 0030:
|
|
??_C@_0DA@BMPMGKCG@actor?5?$CFs?5melee?5animation?5has?5no?5@ (0000)
|
|
*/
|
|
|
|
/* ---------- headers */
|
|
|
|
#include "cseries.h"
|
|
|
|
#define real_random real_random_inline
|
|
#include "actions.h"
|
|
|
|
#include "actor_definitions.h"
|
|
#include "actors.h"
|
|
#include "math/real_math.h"
|
|
#undef real_random
|
|
|
|
/* ---------- constants */
|
|
|
|
enum
|
|
{
|
|
_actor_special_fire_situation_strafing = 3,
|
|
};
|
|
|
|
/* ---------- macros */
|
|
|
|
/* ---------- structures */
|
|
|
|
/* ---------- prototypes */
|
|
|
|
struct actor_variant_definition *actor_combat_get_firing_variant_definition(
|
|
long actor_index);
|
|
|
|
/* ---------- globals */
|
|
|
|
/* ---------- public code */
|
|
|
|
void action_charge_begin(
|
|
long actor_index)
|
|
{
|
|
struct actor_datum *actor = actor_get(actor_index);
|
|
|
|
if (actor->state.action_data.charge.goal == _charge_goal_vehicle_strafing &&
|
|
actor_combat_get_firing_variant_definition(actor_index)->ranged_combat.special_fire_situation ==
|
|
_actor_special_fire_situation_strafing)
|
|
{
|
|
short charge_remaining = actor->control.special_fire_deny_attempts;
|
|
|
|
if (charge_remaining > 0)
|
|
{
|
|
actor->control.special_fire_deny_attempts = charge_remaining - 1;
|
|
}
|
|
}
|
|
|
|
return;
|
|
}
|
|
|
|
void action_charge_update(
|
|
long actor_index)
|
|
{
|
|
struct actor_datum *actor = actor_get(actor_index);
|
|
|
|
if (actor->state.action_data.charge.goal == _charge_goal_melee_leaping &&
|
|
actor->state.action_data.charge.launched_leap &&
|
|
!actor->state.action_data.charge.launched_melee_attack &&
|
|
!actor->input.in_midair)
|
|
{
|
|
++actor->state.action_data.charge.leap_failure_timer;
|
|
}
|
|
|
|
return;
|
|
}
|
|
|
|
real real_random(
|
|
void)
|
|
{
|
|
return real_seed_random(
|
|
get_global_random_seed_address());
|
|
}
|
|
|
|
/* ---------- private code */
|