MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / qGetBuddyObj

Function qGetBuddyObj

scripts/TrainingMission.cpp:536–545  ·  view source on GitHub ↗

$$QUERY Objects o:Player's [i:PlayerNum] Buddy Bot object qGetBuddyObj GetBuddyObj Gets a player's buddy bot object based on a player number Parameters: PlayerNum: the player to get the buddy bot from $$END */

Source from the content-addressed store, hash-verified

534$$END
535*/
536int qGetBuddyObj(int playernum) {
537 msafe_struct mstruct;
538 mstruct.slot = playernum;
539 MSafe_GetValue(MSAFE_OBJECT_PLAYER_HANDLE, &mstruct);
540
541 int buddy_handle;
542 Player_Value(mstruct.objhandle, VF_GET, PLYV_I_BUDDY_HANDLE, &buddy_handle);
543
544 return buddy_handle;
545}
546
547/*
548$$QUERY

Callers 1

CallEventMethod · 0.85

Calls 1

Player_ValueFunction · 0.85

Tested by

no test coverage detected