I'm freshening up my C skills (nub atm) and what better way to do this than with the ET SDK ! Now as I was strolling through the latest ETPub code I noticed b_realhead was in there, which is very very cool of course!
So I tried compiling it (the ETPub code) on a Linux box with gcc4 and that works like a charm. However with the Visual C++ compiler from MS (you can get the free one here) it starts whining about unreferenced external symbol rint which is mentioned in cg_players.c:
Code: Select all
// zinx - use predictable center so server can match cgame easier
centerAngle = rint(*angle / swingTolerance) * swingTolerance;
Now putting aside the discussion on compilers & platforms (I know it's C and not C++ code and that MS is evil), wouldn't it be prudent to look for another function already to do the same so that portability is maximised towards future developments? Or am I way off base here?
--------------------
By the way, for those of you who want to compile Visual C++ .sln files without having to obtain MS Visual Studio .NET in one way or another, here's how I did it:
- Install the MS Platform SDK (don't forget to install DB connectivity or the ET SDK doesn't compile).
- Install the Visual C++ 2003 Toolkit
- Install Code::Blocks
- Open the wolf.sln solution and start compiling