Pages: [1]
  Print  
Author Topic: Saracen's Lightning Discharge  (Read 14245 times)
The Geez
Nub


Cakes 0
Posts: 13


« on: September 03, 2011, 01:47:07 pm »

I am trying to incorporate Saracen's Lightning Discharge into the code for my server, but I am having an issue. Apparently, some of the code is not compatible with the OAX code. It was written for the Q3 original source. So, there are things that are not working properly.

http://www.quakewiki.net/archives/code3arena/tutorials/tutorial13.shtml


At this point I have all the code in, but it only appears to discharge self when underwater, and not others in the water.

Any suggestions??
Logged
The Geez
Nub


Cakes 0
Posts: 13


« Reply #1 on: September 04, 2011, 01:26:40 pm »

Nobody?? Sheesh!

More specifically, from g_weapon.c, this section of code needs to be rewritten to work in OAX because PERS_ACCURACY_HITS is no longer in use.

// The SARACEN's Lightning Discharge - START
   if (trap_PointContents (muzzle, -1) & MASK_WATER)
   {
      int cells = ent->client->ps.ammo[WP_LIGHTNING];
      ent->client->ps.ammo[WP_LIGHTNING] = 0;
      if (G_WaterRadiusDamage (muzzle, ent, damage * cells,
               damage * cells, NULL, MOD_LIGHTNING_DISCHARGE))
         g_entities[ent->r.ownerNum].client->ps.persistant[PERS_ACCURACY_HITS]++;
      return;
   }
// The SARACEN's Lightning Discharge - END


Logged
sago007
Posts a lot
*

Cakes 62
Posts: 1659


Open Arena Developer


WWW
« Reply #2 on: September 04, 2011, 01:50:15 pm »

I cannot see why this should prevent other players from being damaged. Have you tried increasing the radius to be sure other players are not damaged.
Logged

There are nothing offending in my posts.
The Geez
Nub


Cakes 0
Posts: 13


« Reply #3 on: September 04, 2011, 04:05:11 pm »

I cannot see why this should prevent other players from being damaged. Have you tried increasing the radius to be sure other players are not damaged.

Well, I can't compile it. It crashes on g_weapon.c because PERS_ACCURACY_HITS is undeclared. In fact, I believe the ioquake project has removed this from public.h completely.
Logged
revanic
VIP
Half-Nub


Cakes 4
Posts: 67


« Reply #4 on: August 01, 2012, 11:44:58 pm »

kinda late to say this, but change it to client->accuracy_hits++
Logged
Jakash3
I EDITED ALL MY POSTS OUT LOL!!! TAKE THAT, INTERNET FORUM!!
Half-Nub


Cakes -9
Posts: 89


SELF-IMPOSED CENSORSHIP FTW!


« Reply #5 on: January 14, 2013, 02:10:08 pm »

I give up on openarena
« Last Edit: February 12, 2014, 01:03:25 am by Jakash3 » Logged

BY THE WAY I GAVE UP ON OPENARENA
Pages: [1]
  Print  
 
Jump to: