MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / update

Method update

ogsr_engine/COMMON_AI/alife_monster_brain.cpp:140–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void CALifeMonsterBrain::update(const bool forced)
141{
142#if 0 // def DEBUG
143 if (!Level().MapManager().HasMapLocation("debug_stalker",object().ID)) {
144 CMapLocation *map_location =
145 Level().MapManager().AddMapLocation(
146 "debug_stalker",
147 object().ID
148 );
149
150 map_location->SetHint (object().name_replace());
151 }
152#endif
153
154 select_task(forced);
155
156 if (object().m_smart_terrain_id != 0xffff)
157 process_task();
158 else
159 default_behaviour();
160
161 movement().update();
162}
163
164void CALifeMonsterBrain::default_behaviour() { movement().path_type(MovementManager::ePathTypeNoPath); }
165

Callers 1

update_scriptFunction · 0.45

Calls 5

HasMapLocationMethod · 0.80
AddMapLocationMethod · 0.80
SetHintMethod · 0.80
name_replaceMethod · 0.80
objectFunction · 0.50

Tested by

no test coverage detected