Hello everybody, sorry I don't know Russian language so I use to speak English
I tried to compile source codes from XashXT, from the last version 0.65 but I have a problem with the dimenision of compiled server.dll ...
Without editing anything inside I just tried to compile source codes to check if it compiles fine but dimension of the compiled server.dll its 3,189 kb, compared to the original server.dll wich has just 1,352 kb.
It work fine when I play...but dimension of this 2 files scares me
I use Microsoft Visual Studio 6 to compile this source codes.
Another problem its with adding a new monster in Xash3D v0.65... I tried to add monster_gonome, with this source code "gonome.cpp" but while compiling the source code I get these errors:
code:--------------------Configuration: server - Win32 Debug--------------------
Compiling...
gonome.cpp
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(70) : warning C4002: too many actual parameters for macro 'DEFINE_FIELD'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(70) : error C2597: illegal reference to data member 'CGonomeSpit::m_maxFrame' in a static member function
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(70) : error C2440: 'initializing' : cannot convert from '' to 'enum _fieldtypes'
Context does not allow for disambiguation of overloaded function
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(70) : error C2440: 'initializing' : cannot convert from 'char [12]' to 'enum _fieldtypes'
There is no context in which this conversion is possible
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(70) : error C2065: 'classNameTypedef' : undeclared identifier
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(70) : error C2059: syntax error : ')'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(70) : error C2143: syntax error : missing ';' before '}'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(70) : error C2143: syntax error : missing ';' before '}'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(71) : error C2143: syntax error : missing ';' before '}'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(71) : error C2143: syntax error : missing ';' before '}'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(111) : error C2664: 'UTIL_SetOrigin' : cannot convert parameter 1 from 'struct entvars_s *' to 'class CBaseEntity *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(307) : warning C4002: too many actual parameters for macro 'DEFINE_FIELD'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(307) : error C2597: illegal reference to data member 'CGonome::m_fCanThreatDisplay' in a static member function
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(307) : error C2440: 'initializing' : cannot convert from '' to 'enum _fieldtypes'
Context does not allow for disambiguation of overloaded function
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(307) : error C2440: 'initializing' : cannot convert from 'char [8]' to 'enum _fieldtypes'
There is no context in which this conversion is possible
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(307) : error C2059: syntax error : ')'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(307) : error C2143: syntax error : missing ';' before '}'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(307) : error C2143: syntax error : missing ';' before '}'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(308) : warning C4002: too many actual parameters for macro 'DEFINE_FIELD'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(308) : error C2143: syntax error : missing ';' before '{'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(308) : error C2447: missing function header (old-style formal list?)
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(308) : error C2143: syntax error : missing ';' before ','
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(309) : warning C4002: too many actual parameters for macro 'DEFINE_FIELD'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(309) : error C2143: syntax error : missing ';' before '{'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(309) : error C2447: missing function header (old-style formal list?)
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(309) : error C2143: syntax error : missing ';' before ','
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(310) : error C2143: syntax error : missing ';' before '}'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(310) : error C2143: syntax error : missing ';' before '}'
Error executing cl.exe.
server.dll - 24 error(s), 4 warning(s)
I can say that the engine AM: Rebirth do not get these errors when I want to implement monster_gonome (with same source code) and the compilation works fine and the result is very good
Don't know for sure, but it appears that DEFINE_FIELD syntax is different in XashXT (which is not 100% HL-compatible by design). Look how other monsters are made in XashXT.
Burner писал: I tried to compile source codes from XashXT, from the last version 0.65 but I have a problem with the dimenision of compiled server.dll ...
Without editing anything inside I just tried to compile source codes to check if it compiles fine but dimension of the compiled server.dll its 3,189 kb, compared to the original server.dll wich has just 1,352 kb.
It work fine when I play...but dimension of this 2 files scares me
Probably you build dll in debug-mode.
Цитата:
Burner писал: I tried to add monster_gonome, with this source code "gonome.cpp" but while compiling the source code I get these errors:
XashXT uses different save-restore system like in HL2. There two examples for better understanding:
Original half-life (aflock.cpp)
~ X ~ писал: Don't know for sure, but it appears that DEFINE_FIELD syntax is different in XashXT (which is not 100% HL-compatible by design). Look how other monsters are made in XashXT.
Yep...
Цитата:
Cybermax писал: Хотите верьте хотите нет в первый момент прочитал ник топикстартера не Бюрнер а Бумер
I said that I don't know Russian language ...but thanks for help!
Цитата:
Дядя Миша писал: Probably you build dll in debug-mode.
Hmm... possible, it would be something bad for .dll compiled file?
Цитата:
Дядя Миша писал: XashXT uses different save-restore system like in HL2. There two examples for better understanding:
Yes...I got it, this must be, thank you verry much!
Цитата:
Дядя Миша писал: And if you use Xash3D you should change the modinfo on MODDB
Oh...of course I put, sorry for dealy but I said to launch this news with some new stuffs... but don't worry, everybody will know that I work on XashXD!
Дядя Миша писал: XashXT uses different save-restore system like in HL2.
I did realize that also when I tried HL SDK tutorials on the internet, that did reduce the amount of coding you do when you save and restore message calling in the dlls though.
BTW, I know that not all code in the Source SDK are implemented in Xash, right?
This problem with "gonome.cpp" was solved largely, but still get 3 errors ... I changed that save-restore system like in XashXT engine...
--------------------Configuration: server - Win32 Debug--------------------
Compiling...
gonome.cpp
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(107) : error C2664: 'UTIL_SetOrigin' : cannot convert parameter 1 from 'struct entvars_s *' to 'class CBaseEntity *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(302) : error C2509: 'GetDataDescMap' : member function not declared in 'CGonome'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(187) : see declaration of 'CGonome'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(302) : error C2509: 'GetBaseMap' : member function not declared in 'CGonome'
d:\games\the volcano\volcano\devkit\source_code\volcano\server\gonome.cpp(187) : see declaration of 'CGonome'
Error executing cl.exe.
I saw some error like that when I was compiling old HL SDK tutorial stuff as well, you need to examine other monster codes carefully and reincorporate their code. It's not just in the public declaration that you need to rewrite as well.
By public declaration, i mean the part in CBaseMonster.
I say, look further down from the declaration on the other monster codes. I'll try to find where.
EDIT: Nevermind, this is not a problem in save/restore. That's from the code:
C++ Source Code:
UTIL_SetOrigin( [u]pGSpit->pev[/u], vecStart );
Specifically, in where I underlined it.
It's a problem that is more than I can handle though. I still couldn't understand about the pev thing.
1. replace UTIL_SetOrigin( pGSpit->pev, vecStart ); with UTIL_SetOrigin( pGSpit, vecStart ); like in SOHL mod.
2. may be you forget about DECLARE_DATADESC(); ?
Добавлено 07-05-2014 в 20:35:
PS. And i recommend replace all pev->origin with GetAbsOrigin(), pev->angles with GetAbsAngles() and pev->velocity with GetAbsvelocity() but this is optional for monsters.