OpenArena Message Boards

id Tech 3 => cgame/game/ui => Topic started by: The Geez on September 03, 2011, 01:47:07 PM



Title: Saracen's Lightning Discharge
Post by: The Geez 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
 (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??


Title: Re: Saracen's Lightning Discharge
Post by: The Geez 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




Title: Re: Saracen's Lightning Discharge
Post by: sago007 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.


Title: Re: Saracen's Lightning Discharge
Post by: The Geez 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.


Title: Re: Saracen's Lightning Discharge
Post by: revanic on August 01, 2012, 11:44:58 PM
kinda late to say this, but change it to client->accuracy_hits++


Title: Re: Saracen's Lightning Discharge
Post by: Jakash3 on January 14, 2013, 02:10:08 PM
I give up on openarena