Jump to content

Grenade Charging


wajdzik

Recommended Posts

Ok, i found a clue - file grenade.weap and weapon.cfg

 

grenda.weap:

weaponDef
{
// This basically fills out weaponInfo_t
client {
 //standModel  ""		  // weapon pickup 'stand' (do we still use this?)
 //pickupModel  ""
 //pickupSound  "sound/misc/w_pkup.wav"

 weaponConfig  "models/weapons2/grenade/weapon.cfg"
 handsModel   "models/weapons2/grenade/v_grenade_hand.mdc"

 flashDlightColor 1 0.7 0.5
 flashSound   "sound/weapons/grenade/gren_throw.wav" // supports up to 4 flash sounds
 //flashEchoSound ""		  // supports up to 4 flash echo sounds
 //lastShotSound  ""		  // supports up to 4 last shot sounds

 //readySound  ""
 //firingSound  ""		 // no weapons seem to use this, basically it's a replacement hum for readysound, but then when firing
 //overheatSound  ""
 //reloadSound  ""
 //reloadFastSound ""		 // some weapons have fast reloads due to the skill system
 //spinupSound  ""		  // sound started when fire button goes down, and stepped on when the first fire event happens
 //spindownSound  ""		 // sound called if the above is running but player doesn't follow through and fire
 //switchSound  ""		 // allow overriding of weaponswitch sound

 //weaponIcon   "icons/iconw_grenade_1"
 weaponSelectedIcon "icons/iconw_grenade_1_select"

 missileModel  "models/ammo/grenade1.md3"
 //missileSound  ""
 missileTrailFunc "GrenadeTrail"	  // supports "GrenadeTrail", "RocketTrail", "PyroSmokeTrail" and "DynamiteTrail" (we REALLY want a particle system for this)
 //missileDlight  0
 //missileDlightColor 0 0 0	   // do we still use this?

 //ejectBrassFunc ""		 // supports "MachineGunEjectBrass" and "PanzerFaustEjectBrass"

 //modModel 1  ""

 firstPerson {
  model   "models/weapons2/grenade/v_grenade.md3"
  //flashModel  ""
  // weapon building
  // the parts are numbered because there are some hardcoded references for some weapons to certain parts
  weaponLink
  {
   part 0
   {
 tag  "tag_barrel"
 model "models/weapons2/grenade/v_grenade_barrel.mdc"
   }
  }
 }

 thirdPerson {
  model   "models/weapons2/grenade/ss_grenade.md3"
  //flashmodel  ""
 }
}
}

 

and

 

///////////////////////
//
//  GRENADE
//
///////////////////////

newfmt
// config file for weapon animations

//								 barrel					 barrel
//    first  length  fps  looping  anim bits  animated weap   draw bits
//	 /   ___/	  /	 /	  /		   /			  /
//    /   /   ______/	 /	  /		   /			  /
//   /   /   /   ________/	  /		   /			  /
//  /   /   /   /   ___________/		   /			  /
// /   /   /   /   /   ___________________/			  /
///   /   /   /   /   /   ______________________________/
//   /   /   /   /   /   /
0 1 20 1 0 0 0 // IDLE1
0 1 20 1 0 0 0 // IDLE2
1 2 10 0 0 0 0 // ATTACK1
//2 1 10 1 0 0 0 // ATTACK2
1 2 10 0 0 0 0 // ATTACK2
1 2 10 0 0 0 0 // ATTACK3
7 5 20 0 0 0 0 // DROP
12 4 10 0 0 0 0 // RAISE
12 4 16 0 0 0 0 // RELOAD1
12 4 16 4 0 0 0 // RELOAD2
12 4 16 0 0 0 0 // RELOAD3
0 1 20 1 0 0 0 // ALTSWITCH (SA) new alt-mode switching anim
0 1 20 1 0 0 0 // ALTSWITCH (SA) new alt-mode switching anim

 

but i still have no idea what value change to get different time od nade's charging :/

Link to comment
Share on other sites

  • 2 weeks later...
  • Management

just reporting what few guys said "wont always shot"

 

Then I would suggest to ask those "few guys" to take demo or something so we can look into it and if it's a bug we will try to fix it in next release.

 

What Petbark said is also true.

Link to comment
Share on other sites

  • Management

I don't think it's possible, unless pm->ps->grenadeTimeLeft is accessible through the lua API

 

case WP_GRENADE_PINEAPPLE:
case WP_SMOKE_BOMB:
if(!delayedFire) {
if(PM_WeaponAmmoAvailable(pm->ps->weapon)) {
 if(pm->ps->weapon == WP_DYNAMITE) {
 pm->ps->grenadeTimeLeft = 50;
 } else {
 pm->ps->grenadeTimeLeft = 4000; // start at four seconds and count down

 

EDIT1:

it's hardcoded to be 4000, it's not a value set from above. We could create some server cvar for that, so you could change that.

Link to comment
Share on other sites

Server cvar would be great. I think that is cvar like this in one of mods, but curently i don't remember in whichone. I'll try use your idea and create something what could change this without cvar, but i can start working with this after 15 july.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...