View Single Post
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 04-10-2018 , 15:06   Re: [EXTENSION] NPCs in CS:S (extended)
Reply With Quote #13

I've solved main problems, there are some not very difficult left though.
I have to put CEntity:: before each call of CEntity-member functions, to get rid of such errors:
Quote:
/home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/Class/CItem.h:405:17: error: there are no arguments to ‘DoMuzzleFlash’ that depend on a template parameter, so a declaration of ‘DoMuzzleFlash’ must be available [-fpermissive]
DoMuzzleFlash();
Can anybody recommend me a simpler solution?

And I have this error:
Quote:
In file included from /home/d/SDK/sourcemod/extensions/npc/Extension/extension.h:4:0,
from /home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/CEntityManager.h:24,
from /home/d/SDK/sourcemod/extensions/npc/Extension/Monster/npc_vortigaunt.h:4,
from /home/d/SDK/sourcemod/extensions/npc/Extension/Monster/npc_vortigaunt.cpp:
/home/d/SDK/sourcemod/extensions/npc/Extension/Monster/npc_vortigaunt.cpp: In function ‘datamap_t* DataMapInit(T*) [with T = CNPC_Vortigaunt]’:
/home/d/SDK/hl2sdk-css/public/datamap.h:190:188: error: invalid static_cast from type ‘void (CNPC_Vortigaunt::*)(inputdata_t&)’ to type ‘inputfunc_t {aka void (CBaseEntity::*)(inputdata_t&)}’
#define DEFINE_INPUTFUNC( fieldtype, inputname, inputfunc ) { fieldtype, #inputfunc, { 0, 0 }, 1, FTYPEDESC_INPUT, inputname, NULL, static_cast <inputfunc_t> (&classNameTypedef::inputfunc) }
^
/home/d/SDK/sourcemod/extensions/npc/Extension/Monster/npc_vortigaunt.cpp:132:2: note: in expansion of macro ‘DEFINE_INPUTFUNC’
DEFINE_INPUTFUNC( FIELD_VOID, "Dispel", InputDispel ),
^
/home/d/SDK/hl2sdk-css/public/datamap.h:190:188: error: invalid static_cast from type ‘void (CNPC_Vortigaunt::*)(inputdata_t&)’ to type ‘inputfunc_t {aka void (CBaseEntity::*)(inputdata_t&)}’
#define DEFINE_INPUTFUNC( fieldtype, inputname, inputfunc ) { fieldtype, #inputfunc, { 0, 0 }, 1, FTYPEDESC_INPUT, inputname, NULL, static_cast <inputfunc_t> (&classNameTypedef::inputfunc) }
^
/home/d/SDK/sourcemod/extensions/npc/Extension/Monster/npc_vortigaunt.cpp:133:2: note: in expansion of macro ‘DEFINE_INPUTFUNC’
DEFINE_INPUTFUNC( FIELD_VOID, "BeginCarryNPC", InputBeginCarryNPC ),
^
/home/d/SDK/hl2sdk-css/public/datamap.h:190:188: error: invalid static_cast from type ‘void (CNPC_Vortigaunt::*)(inputdata_t&)’ to type ‘inputfunc_t {aka void (CBaseEntity::*)(inputdata_t&)}’
#define DEFINE_INPUTFUNC( fieldtype, inputname, inputfunc ) { fieldtype, #inputfunc, { 0, 0 }, 1, FTYPEDESC_INPUT, inputname, NULL, static_cast <inputfunc_t> (&classNameTypedef::inputfunc) }
^
/home/d/SDK/sourcemod/extensions/npc/Extension/Monster/npc_vortigaunt.cpp:134:2: note: in expansion of macro ‘DEFINE_INPUTFUNC’
DEFINE_INPUTFUNC( FIELD_VOID, "EndCarryNPC", InputEndCarryNPC ),
^
/home/d/SDK/hl2sdk-css/public/datamap.h:190:188: error: invalid static_cast from type ‘void (CNPC_Vortigaunt::*)(inputdata_t&)’ to type ‘inputfunc_t {aka void (CBaseEntity::*)(inputdata_t&)}’
#define DEFINE_INPUTFUNC( fieldtype, inputname, inputfunc ) { fieldtype, #inputfunc, { 0, 0 }, 1, FTYPEDESC_INPUT, inputname, NULL, static_cast <inputfunc_t> (&classNameTypedef::inputfunc) }
^
/home/d/SDK/sourcemod/extensions/npc/Extension/Monster/npc_vortigaunt.cpp:136:2: note: in expansion of macro ‘DEFINE_INPUTFUNC’
DEFINE_INPUTFUNC( FIELD_BOOLEAN, "TurnBlue", InputTurnBlue ),
^
/home/d/SDK/hl2sdk-css/public/datamap.h:190:188: error: invalid static_cast from type ‘void (CNPC_Vortigaunt::*)(inputdata_t&)’ to type ‘inputfunc_t {aka void (CBaseEntity::*)(inputdata_t&)}’
#define DEFINE_INPUTFUNC( fieldtype, inputname, inputfunc ) { fieldtype, #inputfunc, { 0, 0 }, 1, FTYPEDESC_INPUT, inputname, NULL, static_cast <inputfunc_t> (&classNameTypedef::inputfunc) }
^
/home/d/SDK/sourcemod/extensions/npc/Extension/Monster/npc_vortigaunt.cpp:137:2: note: in expansion of macro ‘DEFINE_INPUTFUNC’
DEFINE_INPUTFUNC( FIELD_BOOLEAN, "TurnBlack", InputTurnBlack ),
^
I have no idea what to do with it. baseclass of CNPC_Vortigaunt is CEntity, not CBaseEntity, is it ok if I change the definition CBaseEntity -> CEntity ?
Does any of you guys have skype?

Btw I ran a server yesterday on my old windows mashine, it gathered 4 players and everything worked just fine. The only problem I had - a crash heppend when I ran the server for the first time and tryed to join it. And one more thing Sven Co-op maps would go nicely with this mode, there thousands of maps and it's not really difficult to get sources form some of them.
Attached Images
File Type: jpg 20180407191604_1.jpg (94.8 KB, 727 views)
Attached Files
File Type: 7z npc.7z (724.9 KB, 265 views)

Last edited by kadet.89; 04-12-2018 at 08:32.
kadet.89 is offline
Send a message via Skype™ to kadet.89