project-navigation
Personal tools

Author Topic: [SUGGESTION] Reaction fire automatic weapons behavior  (Read 15948 times)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools

Offline Yatta

  • Rookie
  • ***
  • Posts: 57
    • View Profile
Re: [SUGGESTION] Reaction fire automatic weapons behavior
« Reply #31 on: March 27, 2010, 03:27:03 pm »
Here are the updated patch. Pretty straightforward :

- file "...AND_other_tweaks" still includes the other gameplay tweaks from the original patch

- file "...MINUS_other_tweaks" has the following *removed* : actor starts round with half TU after being dazed, critical hit system, actors stunned by high damage, stunned actors HP set to very low when mission ends, sniper accuracy tweak.

- for both files : used no brackets "if", removed commented code, removed broadcast debug messages, removed typo corrections, used _("Blah blah.") for messages, tried to follow coding guidelines, corrected the vec2_t bug.

Note that :
The new TU spending system is required for the new RF system. It would not make much points not to include the survey point (aimAt) since the goal is to have a new RF patch. All this requires new struct elements, new functions, definitions, network messages on both moving, combat, and reaction firing domains, also required edition of ufo weapon def files. Hence : lots of files are still impacted with the 'MINUS' patch.

IMPORTANT :
I hand-modified the .patch files, and im not 100% sure i did it right. Use with caution.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: [SUGGESTION] Reaction fire automatic weapons behavior
« Reply #32 on: March 27, 2010, 04:16:25 pm »
Code: [Select]
if (ent->aimAt[0]==0) isn't working imo - 0 is a valid grid position

Code: [Select]
if (ent->aimAt[0]==0) memcpy(ent->aimAt,to,sizeof(ent->aimAt)); doesn't meet the coding guidelines

Code: [Select]
ent->IsMoving = qtrue; =>
Code: [Select]
ent->isMoving = qtrue;
Code: [Select]
float react =  80000/(((ent->chr.score.skills[ABILITY_MIND]*2)+ent->chr.score.skills[ABILITY_SPEED])*((ent->chr.score.skills[ABILITY_MIND]*2)+ent->chr.score.skills[ABILITY_SPEED])); doesn't meet the coding guidelines - whitespaces ;)

Code: [Select]
edict_t *ent1 = NULL; please chose another name

Code: [Select]
int best_shots = 0; please use camelCase

Code: [Select]
ent->NextReactionShoot = 1+(mobility*(diff/45)); please use camelCase and add whitespaces

Code: [Select]
awareAdd = (1 - ((diff/45)*(mobility/6)))*2;
awareAdd = max(0.1,awareAdd);

coding guidelines - there are more locations so i won't report this anymore here.

i know that i'm picky about this - but a lot of people are working on the code - they all have to understand it and read it. so coding guidelines are a must-have.