2424* Development Team grants this exception to all derivative works.
2525*/
2626
27+ #include " eiface.h"
28+ #include " ispsharedmemory.h"
29+ #include " usermessage/usermessage.h"
30+
31+ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (get_single_player_shared_memory_space_overload, GetSinglePlayerSharedMemorySpace, 1 , 2 );
32+
2733template <class T >
2834void IVEngineServer_Visitor (T cls)
2935{
30- /*
31- CS:GO:
32- // get arbitrary launch options
33- virtual KeyValues* GetLaunchOptions( void ) = 0;
34- virtual bool IsUserIDInUse( int userID ) = 0; // TERROR: used for transitioning
35- virtual int GetLoadingProgressForUserID( int userID ) = 0; // TERROR: used for transitioning
36- virtual void SendUserMessage( IRecipientFilter &filter, int message, const google::protobuf::Message &msg );
37- virtual bool IsLogEnabled() = 0;
38- // What is the game timescale multiplied with the host_timescale?
39- virtual float GetTimescale( void ) const = 0;
40- // Is the engine running a background map?
41- virtual bool IsLevelMainMenuBackground( void ) = 0;
42- virtual bool IsAnyClientLowViolence() = 0;
43- virtual bool IsSplitScreenPlayer( int ent_num ) = 0;
44- virtual edict_t *GetSplitScreenPlayerAttachToEdict( int ent_num ) = 0;
45- virtual int GetNumSplitScreenUsersAttachedToEdict( int ent_num ) = 0;
46- virtual edict_t *GetSplitScreenPlayerForEdict( int ent_num, int nSlot ) = 0;
47-
48- // Used by Foundry to hook into the loadgame process and override the entities that are getting loaded.
49- virtual bool IsOverrideLoadGameEntsOn() = 0;
50-
51- // Used by Foundry when it changes an entity (and possibly its class) but preserves its serial number.
52- virtual void ForceFlushEntity( int iEntity ) = 0;
53-
54- //Finds or Creates a shared memory space, the returned pointer will automatically be AddRef()ed
55- virtual ISPSharedMemory *GetSinglePlayerSharedMemorySpace( const char *szName, int ent_num = MAX_EDICTS ) = 0;
56-
57- // Allocate hunk memory
58- virtual void *AllocLevelStaticData( size_t bytes ) = 0;
59- virtual bool IsCreatingReslist() = 0;
60- virtual bool IsCreatingXboxReslist() = 0;
61- virtual bool IsDedicatedServerForXbox() = 0;
62- virtual bool IsDedicatedServerForPS3() = 0;
63-
64- virtual void Pause( bool bPause, bool bForce = false ) = 0;
65-
66- virtual void SetTimescale( float flTimescale ) = 0;
67- // Validate session
68- virtual void HostValidateSession() = 0;
69-
70- // Update the 360 pacifier/spinner
71- virtual void RefreshScreenIfNecessary() = 0;
72-
73- // Tells the engine to allocate paint surfaces
74- virtual bool HasPaintmap() = 0;
75-
76- // Calls ShootPaintSphere
77- virtual bool SpherePaintSurface( const model_t *pModel, const Vector &, unsigned char, float, float ) = 0;
78-
79- virtual void SphereTracePaintSurface( const model_t *pModel, const Vector &, const Vector &, float, CUtlVector<unsigned char> & ) = 0;
80-
81- virtual void RemoveAllPaint() = 0;
82-
83- virtual void PaintAllSurfaces( unsigned char ) = 0;
84- virtual void RemovePaint( const model_t *pModel ) = 0;
85- virtual uint64 GetClientXUID( edict_t *pPlayerEdict ) = 0;
86- virtual bool IsActiveApp() = 0;
87-
88- virtual void SetNoClipEnabled( bool bEnabled ) = 0;
89-
90- virtual void GetPaintmapDataRLE( CUtlVector<unsigned int> &mapdata ) = 0;
91- virtual void LoadPaintmapDataRLE( CUtlVector<unsigned int> &mapdata ) = 0;
92- virtual void SendPaintmapDataToClient( edict_t *pEdict ) = 0;
93-
94- virtual float GetLatencyForChoreoSounds() = 0;
95-
96- virtual CrossPlayPlatform_t GetClientCrossPlayPlatform( int ent_num ) = 0;
97-
98- virtual void EnsureInstanceBaseline( int ent_num ) = 0;
99-
100- virtual bool ReserveServerForQueuedGame( const char *szReservationPayload ) = 0;
101-
102- virtual bool GetEngineHltvInfo( CEngineHltvInfo_t &out ) = 0;
103- */
36+ cls
37+ .def (" get_launch_options" ,
38+ &IVEngineServer::GetLaunchOptions,
39+ " Returns abitrary launch options" ,
40+ reference_existing_object_policy ()
41+ )
42+
43+ .def (" is_userid_in_use" ,
44+ &IVEngineServer::IsUserIDInUse,
45+ " Returns whether the user ID is in use." ,
46+ args (" userid" )
47+ )
48+
49+ .def (" get_loading_process_for_userid" ,
50+ &IVEngineServer::GetLoadingProgressForUserID,
51+ args (" userid" )
52+ )
53+
54+ .def (" send_user_message" ,
55+ &IVEngineServer::SendUserMessage,
56+ args (" filter" , " message_type" , " message" )
57+ )
58+
59+ .def (" is_log_enabled" ,
60+ &IVEngineServer::IsLogEnabled,
61+ " Returns whether logging is enabled."
62+ )
63+
64+ .def (" get_timescale" ,
65+ &IVEngineServer::GetTimescale
66+ )
67+
68+ .def (" is_level_main_menu_background" ,
69+ &IVEngineServer::IsLevelMainMenuBackground,
70+ " Returns whether the engine is running a background map."
71+ )
72+
73+ .def (" is_any_client_low_violence" ,
74+ &IVEngineServer::IsAnyClientLowViolence,
75+ args (" ent_num" )
76+ )
77+
78+ .def (" is_split_screen_player" ,
79+ &IVEngineServer::IsSplitScreenPlayer,
80+ args (" ent_num" )
81+ )
82+
83+ .def (" get_split_screen_player_attack_to_edict" ,
84+ &IVEngineServer::GetSplitScreenPlayerAttachToEdict,
85+ args (" ent_num" ),
86+ reference_existing_object_policy ()
87+ )
88+
89+ .def (" get_num_split_screen_users_attached_to_edict" ,
90+ &IVEngineServer::GetNumSplitScreenUsersAttachedToEdict,
91+ args (" ent_num" )
92+ )
93+
94+ .def (" get_split_screen_player_for_edict" ,
95+ &IVEngineServer::GetSplitScreenPlayerForEdict,
96+ args (" ent_num" , " slot" ),
97+ reference_existing_object_policy ()
98+ )
99+
100+ .def (" is_override_load_game_ents_on" ,
101+ &IVEngineServer::IsOverrideLoadGameEntsOn
102+ )
103+
104+ .def (" force_flush_entity" ,
105+ &IVEngineServer::ForceFlushEntity,
106+ args (" entity" )
107+ )
108+
109+ .def (" get_single_player_shared_memory_space" ,
110+ &IVEngineServer::GetSinglePlayerSharedMemorySpace,
111+ get_single_player_shared_memory_space_overload (
112+ " Finds or creates a shared memory_space." ,
113+ args (" name" , " ent_num" )
114+ )[reference_existing_object_policy ()]
115+ )
116+
117+ /*
118+ // TODO: void*
119+ .def("alloc_level_specific_data",
120+ &IVEngineServer::AllocLevelStaticData,
121+ "Allocates hunk memory.",
122+ args("bytes"),
123+ reference_existing_object_policy()
124+ )
125+ */
126+
127+ .def (" is_creating_reslist" ,
128+ &IVEngineServer::IsCreatingReslist
129+ )
130+
131+ .def (" is_creating_xbox_reslist" ,
132+ &IVEngineServer::IsCreatingXboxReslist
133+ )
134+
135+ .def (" is_dedicated_server_for_xbox" ,
136+ &IVEngineServer::IsDedicatedServerForXbox
137+ )
138+
139+ .def (" is_dedicated_server_for_ps3" ,
140+ &IVEngineServer::IsDedicatedServerForPS3
141+ )
142+
143+ .def (" pause" ,
144+ &IVEngineServer::Pause,
145+ args (" pause" , " force" )
146+ )
147+
148+ .def (" set_timescale" ,
149+ &IVEngineServer::SetTimescale,
150+ args (" timescale" )
151+ )
152+
153+ .def (" host_validated_session" ,
154+ &IVEngineServer::HostValidateSession,
155+ " Validates session."
156+ )
157+
158+ .def (" refresh_screen_if_necessary" ,
159+ &IVEngineServer::RefreshScreenIfNecessary,
160+ " Update the 360 pacifier/spinner."
161+ )
162+
163+ .def (" has_paint_map" ,
164+ &IVEngineServer::HasPaintmap,
165+ " Tells the engine to allocate paint surfaces."
166+ )
167+
168+ .def (" sphere_paint_surface" ,
169+ &IVEngineServer::SpherePaintSurface,
170+ args (" model" , " vector" , " uchar" , " float" , " float" )
171+ )
172+
173+ .def (" sphere_trace_paint_surface" ,
174+ &IVEngineServer::SphereTracePaintSurface,
175+ args (" model" , " vector" , " vector" , " float" , " CUtlVector<unsigned char>" )
176+ )
177+
178+ .def (" remove_all_paint" ,
179+ &IVEngineServer::RemoveAllPaint
180+ )
181+
182+ .def (" paint_all_surfaces" ,
183+ &IVEngineServer::PaintAllSurfaces,
184+ args (" uchar" )
185+ )
186+
187+ .def (" remove_paint" ,
188+ &IVEngineServer::RemovePaint,
189+ args (" model" )
190+ )
191+
192+ .def (" get_client_xuid" ,
193+ &IVEngineServer::GetClientXUID,
194+ args (" edict" )
195+ )
196+
197+ .def (" is_active_app" ,
198+ &IVEngineServer::IsActiveApp
199+ )
200+
201+ .def (" set_noclip_enabled" ,
202+ &IVEngineServer::SetNoClipEnabled
203+ )
204+
205+ .def (" get_paint_map_data_rle" ,
206+ &IVEngineServer::GetPaintmapDataRLE,
207+ args (" mapdata" )
208+ )
209+
210+ .def (" load_paint_map_data_rle" ,
211+ &IVEngineServer::LoadPaintmapDataRLE,
212+ args (" mapdata" )
213+ )
214+
215+ .def (" send_paint_map_data_to_client" ,
216+ &IVEngineServer::SendPaintmapDataToClient,
217+ args (" edict" )
218+ )
219+
220+ .def (" get_latency_for_choreo_sounds" ,
221+ &IVEngineServer::GetLatencyForChoreoSounds
222+ )
223+
224+ .def (" get_client_cross_player_platform" ,
225+ &IVEngineServer::GetClientCrossPlayPlatform,
226+ args (" ent_num" )
227+ )
228+
229+ .def (" ensure_instance_baseline" ,
230+ &IVEngineServer::EnsureInstanceBaseline,
231+ args (" ent_num" )
232+ )
233+
234+ .def (" reserve_server_for_queued_game" ,
235+ &IVEngineServer::ReserveServerForQueuedGame,
236+ args (" reservation_payload" )
237+ )
238+
239+ .def (" get_engine_hltv_info" ,
240+ &IVEngineServer::GetEngineHltvInfo,
241+ args (" out" )
242+ )
243+ ;
104244}
0 commit comments