MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Script_Team_Load

Function Script_Team_Load

src/script/team.c:296–312  ·  view source on GitHub ↗

* Loads a new script for the current team. * * Stack: 1 - The script type. * * @param script The script engine to operate on. * @return The value 0. Always. */

Source from the content-addressed store, hash-verified

294 * @return The value 0. Always.
295 */
296uint16 Script_Team_Load(ScriptEngine *script)
297{
298 Team *t;
299 uint16 type;
300
301 t = g_scriptCurrentTeam;
302 type = STACK_PEEK(1);
303
304 if (t->action == type) return 0;
305
306 t->action = type;
307
308 Script_Reset(&t->script, g_scriptTeam);
309 Script_Load(&t->script, type & 0xFF);
310
311 return 0;
312}
313
314/**
315 * Loads a new script for the current team.

Callers

nothing calls this directly

Calls 2

Script_ResetFunction · 0.85
Script_LoadFunction · 0.85

Tested by

no test coverage detected