Author Topic: Wall Walking source code compiling error...  (Read 4495 times)

Oddzball

  • Posts: 3
  • Turrets: +0/-0
Wall Walking source code compiling error...
« on: October 15, 2003, 11:31:15 am »
pass 0: bg_lib
bg_lib:2808 Multiple definitions for acos


Im not sure whats wrong here..

I looked inside bg_public.c and i coudl see that timbo must have added that bit from Sunmicrosystems and im assuming that is where the error is... if someone else had this problem trying to compile the code and found a way to correct it let me know please.

Timbo

  • Administrator
  • Posts: 447
  • Turrets: +155/-161
Wall Walking source code compiling error...
« Reply #1 on: October 15, 2003, 03:34:09 pm »
Your problem is you have multiple definitions for acos :) In other words you have more than one implementation of acos in your source code. The compiler doesn't know which one you want to use so it errors.

I used the Sun acos implementation because originally there was no acos implementation in the source. I could have used a lookup method like id initially did with the other trig functions, but this implementation isn't much more expensive and is inherently more accurate. id later added a lookup table based acos to bg_lib.c. I can't remember the exact version it was introduced, suffice to say if you're using the latest source code it should be commented out anyway. This is because later still (or maybe it was the same patch -- I can't remember) id added passthrough trig functions to the engine callbacks so that when you called a trig function in QVM space it was mapped to an implementation specific trig function provided by the C library. Curiously though, a passthrough for acos was only added to the client side callbacks.

The wall walking code uses acos in the prediction code, so it is relatively important that both server and client side implementations yield the same results. For this reason I disabled the client side acos passthrough by removing the line "equ acos                  -112" from cg_syscalls.asm. Now each module used the Sun acos implementation and everybody was happy :D

In short, my best guess is that your cg_syscalls.asm file still has the acos declaration in it and this is causing the compiler to see two acos definitions on the client side. You should remove this line.

Godmil

  • Posts: 115
  • Turrets: +2/-0
    • http://www.godmil.com
Wall Walking source code compiling error...
« Reply #2 on: October 15, 2003, 08:27:29 pm »
:o  you what?


 :(


*Godmil gets back to the mapping, where everything is easy to understand

Oddzball

  • Posts: 3
  • Turrets: +0/-0
Wall Walking source code compiling error...
« Reply #3 on: October 16, 2003, 08:44:49 am »
I got the wallwalk code to compile and managed to get it working and all. Only real problem is there is some super glitch when you switch into third person, bsicly pointing you view at the ground at your characters foot level, changeing the range and angle doesnt help it either. I was wondering if there was a way to fix this?

OverFlow

  • Posts: 386
  • Turrets: +44/-1
    • http://bobbin.vilkacis.net
Wall Walking source code compiling error...
« Reply #4 on: October 16, 2003, 07:22:45 pm »
hm, I know timbo kinda fixed that in tremulous...

but the wallwalk source code hasn't really been updated since it was integrated into trem. *shrug*

Oddzball

  • Posts: 3
  • Turrets: +0/-0
Wall Walking source code compiling error...
« Reply #5 on: October 17, 2003, 07:46:20 am »
Well i fixed the third person woes... the problem is in bg_pmove.c

under PM_UpdateViewAngles

//force angles to -180 <= x <= 180
  AnglesSubtract( tempang, 0, tempang );
  for( i = 0; i < 3; i++ )
  {
    while( tempang[ i ] > 180 )
      tempang[ i ] -= 180; // ~oddzball : I changed this from -360
   }  
    //while( tempang[ i ] < 180 ) // ~oddzball : Commented the second part out
    //  tempang[ i ] += 180;
  //}

Godmil

  • Posts: 115
  • Turrets: +2/-0
    • http://www.godmil.com
Wall Walking source code compiling error...
« Reply #6 on: October 17, 2003, 10:53:24 am »
Well done :)

I like to use cg_thirdperson when testing my maps, so that could be handy :)

vcxzet

  • Guest
Wall Walking source code compiling error...
« Reply #7 on: January 29, 2007, 06:09:58 pm »
last time I tried it was working

A_Total_noob

  • Posts: 245
  • Turrets: +2/-6
Wall Walking source code compiling error...
« Reply #8 on: January 29, 2007, 06:10:58 pm »
Roflmao.
Ultra l33t necr0o
lawl, people still play Tremulous ?

Risujin

  • Posts: 739
  • Turrets: +33/-13
    • http://risujin.org
Wall Walking source code compiling error...
« Reply #9 on: January 29, 2007, 10:52:10 pm »
Quote from: "vcxzet"
last time I tried it was working

sneaky sneaky

Rawr

  • Posts: 918
  • Turrets: +1/-1
Wall Walking source code compiling error...
« Reply #10 on: February 08, 2007, 02:58:50 am »
vcxzet: Winner of the biggest, most pointless sig award.
img]http://dvclan.org/statsig/statsig.php/3826/4.jpg[/img]

Lava Croft

  • Guest
Wall Walking source code compiling error...
« Reply #11 on: February 12, 2007, 01:56:53 am »
vcxzet is well underway becoming my personal hero.