Closed anthonynguyen closed 10 years ago
Did you try your fix? Is it working as expected?
Yes. @Yascor has also confirmed that it works.
True, full downloading speed!
Thanks!
When i try to compile it on linux i got:
DED_CC code/qcommon/vm_x86_64.c
code/qcommon/vm_x86_64.c: In function ‘VM_CallCompiled’:
code/qcommon/vm_x86_64.c:1062:7: warning: variable ‘programCounter’ set but not used [-Wunused-but-set-variable]
int programCounter;
^
CC code/qcommon/vm_x86_64_assembler.c
code/qcommon/vm_x86_64_assembler.c: In function ‘emit_mov’:
code/qcommon/vm_x86_64_assembler.c:596:11: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
else if(!arg2.v.reg & R_64)
^
LD build/release-linux-x86_64/Quake3-UrT-Ded.x86_64
build/release-linux-x86_64/ded/common.o: In function `Com_Frame':
common.c:(.text+0x4bac): undefined reference to `CL_IsDownloading'
collect2: error: ld returned 1 exit status
make[2]: *** [build/release-linux-x86_64/Quake3-UrT-Ded.x86_64] Error 1
make[2]: Leaving directory `/home/fastslack/mtwProjects/ioq3-for-UrbanTerror-4'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/home/fastslack/mtwProjects/ioq3-for-UrbanTerror-4'
make: *** [release] Error 2
The new function call needs to be excluded with preprocessor directives: the server engine knows nothing of the client one so at compile time that portion of the code must be excluded:
if (!com_dedicated->integer && com_maxfps->integer > 0 && !com_timedemo->integer
#if BUILD_CLIENT == 1
&& !CL_IsDownloading()
#endif
) {
// code goes here
BUILD_CLIENT
is a Makefile flag, but it isn't set as a CFLAG, so the preprocessor has no knowledge of it. In this particular case, you'd have to do #ifndef DEDICATED
instead of #if BUILD_CLIENT == 1
. Another solution is here: Barbatos/ioq3-for-UrbanTerror-4@80567926
Yeah well, you got the point ^^
:tongue:
(fixes FrozenSand/UrbanTerror42#37)