mirror of
https://github.com/fallout2-ce/fallout2-ce.git
synced 2026-07-27 16:47:11 -07:00
Implement real_dude_obj (#537)
This is used by scripts which are party-control aware. Implementing this means they won't crash and should still work properly
This commit is contained in:
@@ -82,7 +82,7 @@ See [`https://sfall-team.github.io/sfall/`](https://sfall-team.github.io/sfall/)
|
||||
| Interface / Cursor | get/set_cursor_mode | ✅ | - |
|
||||
| Locks | lock_is_jammed<br>unjam_lock<br>set_unjam_locks_time | not implemented | - |
|
||||
| INI settings | get_ini_setting<br>get_ini_string<br>get_ini_section<br>get_ini_sections<br>get_ini_config<br>get_ini_config_db<br>set_ini_setting | ✅ | `modified_ini` is intentionally omitted as deprecated. |
|
||||
| Objects and scripts | set_self<br>set_dude_obj<br>real_dude_obj<br>remove_script<br>get/set_script<br>obj_is_carrying_obj<br>loot_obj<br>dialog_obj<br>obj_under_cursor<br>get/set_object_data<br>get/set_flags<br>set_unique_id<br>set_scr_name<br>obj_is_openable<br>get/set_proto_data<br>get_object_ai_data | implemented: set_self, get/set/remove_script, obj_is_carrying_obj, loot_obj, dialog_obj, obj_under_cursor, get_object_data, get_flags, set_flags, set_unique_id, obj_is_openable, get_proto_data, set_proto_data | - |
|
||||
| Objects and scripts | set_self<br>set_dude_obj<br>real_dude_obj<br>remove_script<br>get/set_script<br>obj_is_carrying_obj<br>loot_obj<br>dialog_obj<br>obj_under_cursor<br>get/set_object_data<br>get/set_flags<br>set_unique_id<br>set_scr_name<br>obj_is_openable<br>get/set_proto_data<br>get_object_ai_data | implemented: set_self, real_dude_obj, get/set/remove_script, obj_is_carrying_obj, loot_obj, dialog_obj, obj_under_cursor, get_object_data, get_flags, set_flags, set_unique_id, obj_is_openable, get_proto_data, set_proto_data | get_object_data assumes raw memory offsets which may return different values in CE |
|
||||
| Other / Game management | set_movie_path<br>stop/resume_game<br>mark_movie_played<br>game_loaded<br>get_game_mode<br>get_uptime<br>signal_close_game | implemented: game_loaded, get_game_mode, get_uptime, signal_close_game | - |
|
||||
| Gameplay tweaks | set_pickpocket_max<br>set_hit_chance_max<br>set_xp_mod<br>set_critter_hit_chance_mod<br>set_base_hit_chance_mod<br>set_hp_per_level_mod<br>gdialog_get_barter_mod<br>get/set_unspent_ap_bonus<br>get/set_unspent_ap_perk_bonus<br>set_base_pickpocket_mod<br>set_critter_pickpocket_mod<br>get/set_inven_ap_cost<br>set_drugs_data<br>get_kill_counter<br>mod_kill_counter<br>set_pipboy_available | implemented: gdialog_get_barter_mod, get/set_unspent_ap{_perk}_bonus, get/set_inven_ap_cost | - |
|
||||
| NPCs | inc_npc_level<br>get_npc_level<br>npc_engine_level_up | not implemented | - |
|
||||
|
||||
@@ -83,6 +83,7 @@ static void mf_obj_under_cursor(OpcodeContext& ctx);
|
||||
static void mf_objects_in_radius(OpcodeContext& ctx);
|
||||
static void mf_opcode_exists(OpcodeContext& ctx);
|
||||
static void mf_outlined_object(OpcodeContext& ctx);
|
||||
static void mf_real_dude_obj(OpcodeContext& ctx);
|
||||
static void mf_set_combat_free_move(OpcodeContext& ctx);
|
||||
static void mf_set_cursor_mode(OpcodeContext& ctx);
|
||||
static void mf_set_flags(OpcodeContext& ctx);
|
||||
@@ -167,7 +168,7 @@ const MetaruleInfo kMetarules[] = {
|
||||
{ "obj_under_cursor", mf_obj_under_cursor, 2, 2, 0, { ARG_INT, ARG_INT } },
|
||||
{ "objects_in_radius", mf_objects_in_radius, 3, 4, 0, { ARG_INT, ARG_INT, ARG_INT, ARG_INT } },
|
||||
{ "outlined_object", mf_outlined_object, 0, 0 },
|
||||
// {"real_dude_obj", mf_real_dude_obj, 0, 0},
|
||||
{ "real_dude_obj", mf_real_dude_obj, 0, 0 },
|
||||
{ "reg_anim_animate_and_move", mf_reg_anim_animate_and_move, 4, 4, -1, { ARG_OBJECT, ARG_INT, ARG_INT, ARG_INT } },
|
||||
// {"remove_timer_event", mf_remove_timer_event, 0, 1, -1, {ARG_INT}},
|
||||
// {"set_spray_settings", mf_set_spray_settings, 4, 4, -1, {ARG_INT, ARG_INT, ARG_INT, ARG_INT}},
|
||||
@@ -950,6 +951,11 @@ void mf_outlined_object(OpcodeContext& ctx)
|
||||
ctx.setReturn(gmouse_get_outlined_object());
|
||||
}
|
||||
|
||||
void mf_real_dude_obj(OpcodeContext& ctx)
|
||||
{
|
||||
ctx.setReturn(gDude);
|
||||
}
|
||||
|
||||
void mf_set_combat_free_move(OpcodeContext& ctx)
|
||||
{
|
||||
int value = ctx.arg(0).asInt();
|
||||
|
||||
Reference in New Issue
Block a user