Cavestory Mod API
CSMAPI_PlayerSim.h
Go to the documentation of this file.
1 /*
2  Cavestory Multiplayer API
3  Copyright (C) 2021 Johnny Ledger
4 
5  This software is provided 'as-is', without any express or implied
6  warranty. In no event will the authors be held liable for any damages
7  arising from the use of this software.
8 
9  Permission is granted to anyone to use this software for any purpose,
10  including commercial applications, and to alter it and redistribute it
11  freely, subject to the following restrictions:
12 
13  1. The origin of this software must not be misrepresented; you must not
14  claim that you wrote the original software. If you use this software
15  in a product, an acknowledgment in the product documentation would be
16  appreciated but is not required.
17  2. Altered source versions must be plainly marked as such, and must not be
18  misrepresented as being the original software.
19  3. This notice may not be removed or altered from any source distribution.
20 */
21 
26 #ifndef CAVESTORY_MOD_API_H_
27 #error "Please include CavestoryModAPI.h before including simulation files."
28 #endif
29 
30 #pragma once
31 #include <CSMAPI_begincode.h>
32 
33 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
34 // Player Simulation
35 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
36 
48  SafeClientInterface* pSCI,
49  bool bResetVelocity = true,
50  PlayerDeathType iDeathType = PlayerDeathType::DEATHTYPE_UNKNOWN,
51  NPCHAR* pKillerNpc = NULL,
52  CaveNet::DataStructures::NetClient* pKillerClient = NULL,
53  BOOL bSimulating = FALSE
54 );
55 
63  BOOL bKey,
65 );
66 
74  BOOL bKey,
76 );
77 
85  SafeClientInterface* pSCI,
86  BOOL bSimulating = FALSE
87 );
88 
96 );
97 
104  SafeClientInterface* pSCI
105 );
106 
116  BOOL bKey,
117  SafeClientInterface* pSCI,
118  BOOL bRecord = TRUE,
119  BOOL bSimulating = FALSE
120 );
121 
122 //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
123 
124 #include <CSMAPI_endcode.h>
CAVESTORY_MOD_API BOOL CSM_Player_ActCamera(BOOL bKey, SafeClientInterface *pSCI)
Run standard code to process a player's camera.
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.
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.
CAVESTORY_MOD_API BOOL CSM_Player_AirProcess(SafeClientInterface *pSCI, BOOL bSimulating=FALSE)
Run standard code to process amount of air for players.
CAVESTORY_MOD_API BOOL CSM_Player_ResetFlag(SafeClientInterface *pSCI)
Reset player collision flags.
CAVESTORY_MOD_API BOOL CSM_Player_GetTrg(SafeClientInterface *pSCI)
Get KeyTrg from a player.
CAVESTORY_MOD_API BOOL CSM_Player_Animate(BOOL bKey, SafeClientInterface *pSCI)
Run standard code to animate a player.
PlayerDeathType
A list of possible player death types.
Definition: CSMAPI_enums.h:1215
Networking client.
Definition: CaveNet_ExportedTypes.h:1825
#define CAVESTORY_MOD_API
Exports / imports Cavestory Mod API functions & classes.
Definition: CSMAPI_begincode.h:30
NPC object.
Definition: CSMAPI_types.h:2021
SafeClientInterface.
Definition: CSMAPI_types.h:1775