Skip to content

Commit

Permalink
post_init the player
Browse files Browse the repository at this point in the history
  • Loading branch information
Loobinex committed Sep 3, 2024
1 parent c6e650a commit 00d474a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 27 deletions.
55 changes: 28 additions & 27 deletions src/lvl_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,45 @@
*/
/******************************************************************************/
#include "pre_inc.h"
#include "lvl_script_commands.h"

#include "lvl_script_conditions.h"
#include "lvl_script_lib.h"

#include <math.h>
#include <string.h>

#include "dungeon_data.h"
#include "thing_data.h"
#include "player_instances.h"
#include "keeperfx.hpp"
#include "custom_sprites.h"
#include "gui_soundmsgs.h"
#include "bflib_memory.h"
#include "bflib_sound.h"
#include "config_effects.h"
#include "config_magic.h"
#include "config_players.h"
#include "config_powerhands.h"
#include "config_settings.h"
#include "config_effects.h"
#include "config_spritecolors.h"
#include "config_trapdoor.h"
#include "config_powerhands.h"
#include "config_players.h"
#include "frontmenu_ingame_map.h"
#include "thing_effects.h"
#include "thing_physics.h"
#include "thing_navigate.h"
#include "console_cmd.h"
#include "creature_states_pray.h"
#include "creature_states_mood.h"
#include "room_util.h"
#include "creature_instances.h"
#include "power_hand.h"
#include "power_specials.h"
#include "creature_states.h"
#include "creature_states_mood.h"
#include "creature_states_pray.h"
#include "custom_sprites.h"
#include "dungeon_data.h"
#include "frontmenu_ingame_map.h"
#include "gui_soundmsgs.h"
#include "keeperfx.hpp"
#include "lvl_script_commands.h"
#include "lvl_script_conditions.h"
#include "lvl_script_lib.h"
#include "map_blocks.h"
#include "bflib_memory.h"
#include "post_inc.h"
#include "music_player.h"
#include "bflib_sound.h"
#include "config_spritecolors.h"
#include "player_instances.h"
#include "player_utils.h"
#include "power_hand.h"
#include "power_specials.h"
#include "room_util.h"
#include "sounds.h"
#include "thing_data.h"
#include "thing_effects.h"
#include "thing_navigate.h"
#include "thing_physics.h"

#include "post_inc.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -6032,6 +6032,7 @@ static void computer_player_process(struct ScriptContext* context)
script_support_setup_player_as_computer_keeper(i, model);
get_dungeon(i)->turns_between_entrance_generation = game.generate_speed;
init_creature_states_for_player(i);
post_init_player(get_player(i));
}
else
{
Expand Down
1 change: 1 addition & 0 deletions src/player_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ TbBool player_sell_door_at_subtile(PlayerNumber plyr_idx, MapSubtlCoord stl_x, M
void init_players(void);
void init_player(struct PlayerInfo *player, short no_explore);
void post_init_players(void);
void post_init_player(struct PlayerInfo* player);
void init_players_local_game(void);
void init_keeper_map_exploration_by_terrain(struct PlayerInfo *player);
void init_keeper_map_exploration_by_creatures(struct PlayerInfo *player);
Expand Down

0 comments on commit 00d474a

Please sign in to comment.