Cavestory Mod API
Functions
CSMAPI_PlayerSim.h File Reference
#include <CSMAPI_begincode.h>
#include <CSMAPI_endcode.h>

Go to the source code of this file.

Functions

CAVESTORY_MOD_API BOOL CSM_Player_Kill (SafeClientInterface *pSCI, bool bResetVelocity=true, PlayerDeathType iDeathType=PlayerDeathType::DEATHTYPE_UNKNOWN, NPCHAR *pKillerNpc=NULL, CaveNet::DataStructures::NetClient *pKillerClient=NULL, BOOL bSimulating=FALSE)
 Run standard code to kill a player. More...
 
CAVESTORY_MOD_API BOOL CSM_Player_Animate (BOOL bKey, SafeClientInterface *pSCI)
 Run standard code to animate a player. More...
 
CAVESTORY_MOD_API BOOL CSM_Player_ActCamera (BOOL bKey, SafeClientInterface *pSCI)
 Run standard code to process a player's camera. More...
 
CAVESTORY_MOD_API BOOL CSM_Player_AirProcess (SafeClientInterface *pSCI, BOOL bSimulating=FALSE)
 Run standard code to process amount of air for players. More...
 
CAVESTORY_MOD_API BOOL CSM_Player_ResetFlag (SafeClientInterface *pSCI)
 Reset player collision flags. More...
 
CAVESTORY_MOD_API BOOL CSM_Player_GetTrg (SafeClientInterface *pSCI)
 Get KeyTrg from a player. More...
 
CAVESTORY_MOD_API BOOL CSM_Player_Act (BOOL bKey, SafeClientInterface *pSCI, BOOL bRecord=TRUE, BOOL bSimulating=FALSE)
 Run standard code to make a player act. More...
 

Function Documentation

◆ CSM_Player_Act()

CAVESTORY_MOD_API BOOL CSM_Player_Act ( BOOL  bKey,
SafeClientInterface pSCI,
BOOL  bRecord = TRUE,
BOOL  bSimulating = FALSE 
)

Run standard code to make a player act.

Parameters
bKeyAllow key input.
pSCIThe interface to use.
bRecordWhether or not to record to the active demo.
bSimulatingWhether this is a simulation frame or not.
Returns
Returns TRUE on success, FALSE otherwise.

◆ CSM_Player_ActCamera()

CAVESTORY_MOD_API BOOL CSM_Player_ActCamera ( BOOL  bKey,
SafeClientInterface pSCI 
)

Run standard code to process a player's camera.

Parameters
bKeyAllow key input.
pSCIThe interface to use.
Returns
Returns TRUE on success, FALSE otherwise.

◆ CSM_Player_AirProcess()

CAVESTORY_MOD_API BOOL CSM_Player_AirProcess ( SafeClientInterface pSCI,
BOOL  bSimulating = FALSE 
)

Run standard code to process amount of air for players.

Parameters
pSCIThe interface to use.
bSimulatingIf this is true, then the player cannot run the drown event.
Returns
Returns TRUE on success, FALSE otherwise.

◆ CSM_Player_Animate()

CAVESTORY_MOD_API BOOL CSM_Player_Animate ( BOOL  bKey,
SafeClientInterface pSCI 
)

Run standard code to animate a player.

Parameters
bKeyAllow key input.
pSCIThe interface to use.
Returns
Returns TRUE on success, FALSE otherwise.

◆ CSM_Player_GetTrg()

CAVESTORY_MOD_API BOOL CSM_Player_GetTrg ( SafeClientInterface pSCI)

Get KeyTrg from a player.

Parameters
pSCIThe interface to use
Returns
Returns TRUE on success, FALSE otherwise.

◆ CSM_Player_Kill()

CAVESTORY_MOD_API BOOL CSM_Player_Kill ( SafeClientInterface pSCI,
bool  bResetVelocity = true,
PlayerDeathType  iDeathType = PlayerDeathType::DEATHTYPE_UNKNOWN,
NPCHAR pKillerNpc = NULL,
CaveNet::DataStructures::NetClient pKillerClient = NULL,
BOOL  bSimulating = FALSE 
)

Run standard code to kill a player.

Parameters
pSCIThe interface to use.
bResetVelocityReset the player's velocity.
iDeathTypeThe type of death.
pKillerNpcThe NPC that killed this player (if applicable).
pKillerClientThe client that killed this player (if applicable).
bSimulatingWhether this is a simulation frame or not.
Returns
Returns TRUE on success, FALSE otherwise.

◆ CSM_Player_ResetFlag()

CAVESTORY_MOD_API BOOL CSM_Player_ResetFlag ( SafeClientInterface pSCI)

Reset player collision flags.

Parameters
pSCIThe interface to use
Returns
Returns TRUE on success, FALSE otherwise.