Jump to content

JediBantha

Members
  • Posts

    237
  • Joined

  • Last visited

Everything posted by JediBantha

  1. @@eezstreet Any ideas for making the projectile appear with an FX? It's invisible to the player.
  2. Once more, the Sith will rule the galaxy...
  3. I tried that this morning... The FX for Destruction doesn't seem to wanna cooperate for some reason.
  4. It fires exactly where your crosshairs are pointing towards, now all that's left is making the actual projectile appear.
  5. It's not really telling me much on how to properly align the shot.
  6. @@Asgarath83 I already tried all of that; It can't be done with a direct copy-paste from other weapons/powers. @@eezstreet It seems to only fire downward, and at my initial spawn point whenever I start a new mission in the SP campaign.
  7. Fx only affects the appearance of the power, not the actual direction of the shot, or the damage of the explosion.
  8. I went through and took out all instances of traceEnt in the Destruction code, but now it's just shooting downward no matter what I press... We're making progress, at least. static void ForceDestructionMissile( gentity_t *ent ) {//a fast rocket-like projectile vec3_t start; int damage = forceDestructionDamage[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]]; float vel = 2800; VectorCopy( ent->client->renderInfo.handLPoint, start ); WP_TraceSetStart( ent, start, vec3_origin, vec3_origin );//make sure our start point isn't on the other side of a wall gentity_t *missile = CreateMissile( start, forwardVec, vel, 10000, ent, qfalse ); missile->classname = "destruct_proj"; missile->s.weapon = WP_DESTRUCTION; missile->mass = 10; // Make it easier to hit things VectorSet( missile->maxs, ROCKET_SIZE, ROCKET_SIZE, ROCKET_SIZE ); VectorScale( missile->maxs, -1, missile->mins ); missile->damage = damage; missile->dflags = DAMAGE_EXTRA_KNOCKBACK|DAMAGE_HEAVY_WEAP_CLASS; missile->methodOfDeath = MOD_FORCE_DESTRUCTION; missile->splashMethodOfDeath = MOD_FORCE_DESTRUCTION; missile->clipmask = MASK_SHOT | CONTENTS_LIGHTSABER; missile->splashDamage = floor((float)damage * 0.75f); missile->splashRadius = forceDestructionRadius[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]]; // we don't want it to ever bounce missile->bounceCount = 0; if ( ent && ent->client && ent->client->ps.powerups[PW_GALAK_SHIELD] ) { //has shield up missile->damage = 0; missile->splashDamage = 0; } int modPowerLevel = -1; if ( missile->splashDamage || missile->damage ) { modPowerLevel = WP_AbsorbConversion(ent, ent->client->ps.forcePowerLevel[FP_ABSORB], ent, FP_DESTRUCTION, ent->client->ps.forcePowerLevel[FP_DESTRUCTION], 1); } if (modPowerLevel != -1) { if ( !modPowerLevel ) { missile->damage = 0; missile->splashDamage = 0; } else if ( modPowerLevel == 1 ) { missile->damage = floor((float)damage/4.0f); missile->splashDamage = floor((float)damage/4.0f); } else if ( modPowerLevel == 2 ) { missile->damage = floor((float)damage/2.0f); missile->splashDamage = floor((float)damage/2.0f); } else if ( modPowerLevel == 3 ) { missile->damage = floor((float)damage/1.0f); missile->splashDamage = floor((float)damage/1.0f); } else if ( modPowerLevel == 4 ) { missile->damage = floor((float)damage/0.5f); missile->splashDamage = floor((float)damage/0.5f); } else if ( modPowerLevel == 5 ) { missile->damage = floor((float)damage/0.25f); missile->splashDamage = floor((float)damage/0.25f); } else if ( modPowerLevel == 6 ) { missile->damage = floor((float)damage/0.12f); missile->splashDamage = floor((float)damage/0.12f); } else if ( modPowerLevel == 7 ) { missile->damage = floor((float)damage/0.06f); missile->splashDamage = floor((float)damage/0.06f); } else if ( modPowerLevel == 8 ) { missile->damage = floor((float)damage/0.03f); missile->splashDamage = floor((float)damage/0.03f); } else if ( modPowerLevel > 8 ) { missile->damage = floor((float)damage/0.01f); missile->splashDamage = floor((float)damage/0.01f); } } } void ForceDestructionShoot( gentity_t *self ) { vec3_t end, forward; vec3_t right, up; if ( self->health <= 0 ) { return; } if ( !self->s.number && cg.zoomMode ) {//can't force lightning when zoomed in return; } VectorMA( self->client->renderInfo.handLPoint, NULL, forward, end ); VectorNormalize( forward ); VectorCopy(forward, forwardVec); AngleVectors(self->client->ps.viewangles, forward, right, up); CalcMuzzlePoint(self, forward, right, up, muzzle, NULL); ForceDestructionMissile( self ); }
  9. Run-Time Check Failure #3 - The variable 'traceEnt' is being used without being initialized.
  10. It wouldn't let me build the dll as it was before.
  11. I'm doing final releases, and it crashes whenever I press 'F' while I have Destruction selected.
  12. Never mind, fixed it... But now the game crashes whenever I try to fire it. static void ForceDestructionMissile( gentity_t *ent ) {//a fast rocket-like projectile vec3_t dir; vec3_t start; gentity_t *traceEnt; int damage = forceDestructionDamage[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]]; float vel = 3000; WP_TraceSetStart( ent, start, vec3_origin, vec3_origin );//make sure our start point isn't on the other side of a wall gentity_t *missile = CreateMissile( start, forwardVec, vel, 10000, ent, qfalse ); VectorCopy( forwardVec, dir ); VectorCopy( muzzle, start ); missile->classname = "destruct_proj"; missile->s.weapon = FP_DESTRUCTION; missile->mass = 10; // Make it easier to hit things VectorSet( missile->maxs, ROCKET_SIZE, ROCKET_SIZE, ROCKET_SIZE ); VectorScale( missile->maxs, -1, missile->mins ); missile->damage = damage; missile->dflags = DAMAGE_EXTRA_KNOCKBACK|DAMAGE_HEAVY_WEAP_CLASS; missile->methodOfDeath = MOD_FORCE_DESTRUCTION; missile->splashMethodOfDeath = MOD_FORCE_DESTRUCTION; missile->clipmask = MASK_SHOT | CONTENTS_LIGHTSABER; missile->splashDamage = floor((float)damage * 0.75f); missile->splashRadius = forceDestructionRadius[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]]; // we don't want it to ever bounce missile->bounceCount = 0; if ( traceEnt && traceEnt->client && traceEnt->client->ps.powerups[PW_GALAK_SHIELD] ) { //has shield up missile->damage = 0; missile->splashDamage = 0; } int modPowerLevel = -1; if ( missile->splashDamage || missile->damage ) { modPowerLevel = WP_AbsorbConversion(ent, ent->client->ps.forcePowerLevel[FP_ABSORB], ent, FP_DESTRUCTION, ent->client->ps.forcePowerLevel[FP_DESTRUCTION], 1); } if (modPowerLevel != -1) { if ( !modPowerLevel ) { missile->damage = 0; missile->splashDamage = 0; } else if ( modPowerLevel == 1 ) { missile->damage = floor((float)damage/4.0f); missile->splashDamage = floor((float)damage/4.0f); } else if ( modPowerLevel == 2 ) { missile->damage = floor((float)damage/2.0f); missile->splashDamage = floor((float)damage/2.0f); } else if ( modPowerLevel == 3 ) { missile->damage = floor((float)damage/1.0f); missile->splashDamage = floor((float)damage/1.0f); } else if ( modPowerLevel == 4 ) { missile->damage = floor((float)damage/0.5f); missile->splashDamage = floor((float)damage/0.5f); } else if ( modPowerLevel == 5 ) { missile->damage = floor((float)damage/0.25f); missile->splashDamage = floor((float)damage/0.25f); } else if ( modPowerLevel == 6 ) { missile->damage = floor((float)damage/0.12f); missile->splashDamage = floor((float)damage/0.12f); } else if ( modPowerLevel == 7 ) { missile->damage = floor((float)damage/0.06f); missile->splashDamage = floor((float)damage/0.06f); } else if ( modPowerLevel == 8 ) { missile->damage = floor((float)damage/0.03f); missile->splashDamage = floor((float)damage/0.03f); } else if ( modPowerLevel > 8 ) { missile->damage = floor((float)damage/0.01f); missile->splashDamage = floor((float)damage/0.01f); } } } void ForceDestructionShoot( gentity_t *self ) { int ignore = self->s.number; int traces = 0; gentity_t *traceEnt; vec3_t end, forward; vec3_t right, up; trace_t tr; if ( self->health <= 0 ) { return; } if ( !self->s.number && cg.zoomMode ) {//can't force lightning when zoomed in return; } VectorMA( self->client->renderInfo.handLPoint, NULL, forward, end ); VectorNormalize( forward ); VectorCopy(forward, forwardVec); AngleVectors(self->client->ps.viewangles, forward, right, up); CalcMuzzlePoint(self, forward, right, up, muzzle, NULL); traceEnt = &g_entities[tr.entityNum]; ForceDestructionMissile( self ); }
  13. Error 1 error C3861: 'ForceDestructionMissile': identifier not found I have no idea how to fix this.
  14. void ForceDestructionShoot( gentity_t *self ) { trace_t tr; vec3_t start; vec3_t end, forward; gentity_t *traceEnt; if ( self->health <= 0 ) { return; } if ( !self->s.number && cg.zoomMode ) {//can't force lightning when zoomed in return; } AngleVectors( self->client->ps.viewangles, forward, NULL, NULL ); VectorNormalize( forward ); VectorMA( self->client->renderInfo.handLPoint, NULL, forward, end ); ForceDestructionMissile( self ); } static void ForceDestructionMissile( gentity_t *ent ) {//a fast rocket-like projectile vec3_t dir; vec3_t start; gentity_t *traceEnt; int damage = forceDestructionDamage[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]]; float vel = 3000; WP_TraceSetStart( ent, start, vec3_origin, vec3_origin );//make sure our start point isn't on the other side of a wall gentity_t *missile = CreateMissile( start, forwardVec, vel, 10000, ent, qfalse ); VectorCopy( forwardVec, dir ); VectorCopy( muzzle, start ); missile->classname = "destruct_proj"; missile->s.weapon = WP_DESTRUCTION; missile->mass = 10; // Make it easier to hit things VectorSet( missile->maxs, ROCKET_SIZE, ROCKET_SIZE, ROCKET_SIZE ); VectorScale( missile->maxs, -1, missile->mins ); missile->damage = damage; missile->dflags = DAMAGE_EXTRA_KNOCKBACK|DAMAGE_HEAVY_WEAP_CLASS; missile->methodOfDeath = MOD_FORCE_DESTRUCTION; missile->splashMethodOfDeath = MOD_FORCE_DESTRUCTION; missile->clipmask = MASK_SHOT | CONTENTS_LIGHTSABER; missile->splashDamage = floor((float)damage * 0.75f); missile->splashRadius = forceDestructionRadius[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]]; // we don't want it to ever bounce missile->bounceCount = 0; if ( traceEnt && traceEnt->client && traceEnt->client->ps.powerups[PW_GALAK_SHIELD] ) { //has shield up missile->damage = 0; missile->splashDamage = 0; } int modPowerLevel = -1; if ( missile->splashDamage || missile->damage ) { modPowerLevel = WP_AbsorbConversion(ent, ent->client->ps.forcePowerLevel[FP_ABSORB], ent, FP_DESTRUCTION, ent->client->ps.forcePowerLevel[FP_DESTRUCTION], 1); } if (modPowerLevel != -1) { if ( !modPowerLevel ) { missile->damage = 0; missile->splashDamage = 0; } else if ( modPowerLevel == 1 ) { missile->damage = floor((float)damage/4.0f); missile->splashDamage = floor((float)damage/4.0f); } else if ( modPowerLevel == 2 ) { missile->damage = floor((float)damage/2.0f); missile->splashDamage = floor((float)damage/2.0f); } else if ( modPowerLevel == 3 ) { missile->damage = floor((float)damage/1.0f); missile->splashDamage = floor((float)damage/1.0f); } else if ( modPowerLevel == 4 ) { missile->damage = floor((float)damage/0.5f); missile->splashDamage = floor((float)damage/0.5f); } else if ( modPowerLevel == 5 ) { missile->damage = floor((float)damage/0.25f); missile->splashDamage = floor((float)damage/0.25f); } else if ( modPowerLevel == 6 ) { missile->damage = floor((float)damage/0.12f); missile->splashDamage = floor((float)damage/0.12f); } else if ( modPowerLevel == 7 ) { missile->damage = floor((float)damage/0.06f); missile->splashDamage = floor((float)damage/0.06f); } else if ( modPowerLevel == 8 ) { missile->damage = floor((float)damage/0.03f); missile->splashDamage = floor((float)damage/0.03f); } else if ( modPowerLevel > 8 ) { missile->damage = floor((float)damage/0.01f); missile->splashDamage = floor((float)damage/0.01f); } } } void ForceDestruction( gentity_t *self ) { gentity_t *traceEnt; vec3_t forward; trace_t tr; if ( self->health <= 0 ) { return; } if ( !self->s.number && (cg.zoomMode || in_camera) ) { return; } if ( self->client->ps.leanofs ) { return; } if (self->client->ps.forcePowersActive & (1 << FP_PROTECT) ) { WP_ForcePowerStop( self, FP_PROTECT ); } if (self->client->ps.forcePowersActive & (1 << FP_ABSORB) ) { WP_ForcePowerStop( self, FP_ABSORB ); } if ( self->client->ps.forcePowerLevel[FP_DESTRUCTION] <= FORCE_LEVEL_2 && self->client->ps.forcePower < 80 || self->client->ps.forcePowerLevel[FP_DESTRUCTION] > FORCE_LEVEL_2 && self->client->ps.forcePower < 40 || !WP_ForcePowerUsable( self, FP_DESTRUCTION, 0 ) ) { return; } if ( self->client->ps.saberLockTime > level.time ) {//FIXME: can this be a way to break out? return; } if ( self->client->ps.forcePowerLevel[FP_DESTRUCTION] <= FORCE_LEVEL_2 ) { WP_ForcePowerStart( self, FP_DESTRUCTION, 80 ); NPC_SetAnim( self, SETANIM_TORSO, BOTH_FORCEPUSH, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART ); ForceDestructionShoot( self ); G_SoundOnEnt( self, CHAN_BODY, "sound/weapons/force/forcedestruct01.wav" ); } if ( self->client->ps.forcePowerLevel[FP_DESTRUCTION] > FORCE_LEVEL_2 ) { WP_ForcePowerStart( self, FP_DESTRUCTION, 40 ); NPC_SetAnim( self, SETANIM_TORSO, BOTH_FORCEPUSH, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART ); ForceDestructionShoot( self ); G_SoundOnEnt( self, CHAN_BODY, "sound/weapons/force/forcedestruct01.wav" ); } }
  15. I'm not trying to make a saber edit at all; every usable force power is assigned to a file called "q_shared.h", and their effects are typed onto "wp_saber.cpp" and "g_combat.cpp".
  16. Well, I tried everything... @@eezstreet I was stressed at the time I was working on this particular power, so I couldn't really give a clear answer as to what I was trying to do here. How do you suppose a Fireball would work on JKA's engine? Obviously I can't do a simple copy/paste with the Concussion Rifle onto w_saber.cpp, as it would go in a different direction than the one I'm facing as soon as I, or another NPC would press the "Attack" button.
  17. You pissed on The Matrix... Red Pills ain't gonna fix that.
  18. Either I did something I shouldn't have, or one of the commands is specifically connected to the fire/alt-fire buttons.
  19. void ForceDestructionShoot( gentity_t *self ) { trace_t tr; vec3_t start; vec3_t end, forward; gentity_t *traceEnt; if ( self->health <= 0 ) { return; } if ( !self->s.number && cg.zoomMode ) {//can't force lightning when zoomed in return; } AngleVectors( self->client->ps.viewangles, forward, NULL, NULL ); VectorNormalize( forward ); VectorMA( self->client->renderInfo.handLPoint, NULL, forward, end ); ForceDestructionMissile( self ); } static void ForceDestructionMissile( gentity_t *ent ) {//a fast rocket-like projectile vec3_t start; gentity_t *traceEnt; int damage = forceDestructionDamage[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]]; float vel = 3000; WP_TraceSetStart( ent, start, vec3_origin, vec3_origin );//make sure our start point isn't on the other side of a wall gentity_t *missile = CreateMissile( start, forwardVec, vel, 10000, ent, qfalse ); missile->classname = "destruct_proj"; missile->s.weapon = WP_DESTRUCTION; missile->mass = 10; // Make it easier to hit things VectorSet( missile->maxs, ROCKET_SIZE, ROCKET_SIZE, ROCKET_SIZE ); VectorScale( missile->maxs, -1, missile->mins ); missile->damage = damage; missile->dflags = DAMAGE_EXTRA_KNOCKBACK|DAMAGE_HEAVY_WEAP_CLASS; missile->methodOfDeath = MOD_FORCE_DESTRUCTION; missile->splashMethodOfDeath = MOD_FORCE_DESTRUCTION; missile->clipmask = MASK_SHOT | CONTENTS_LIGHTSABER; missile->splashDamage = floor((float)damage * 0.75f); missile->splashRadius = forceDestructionRadius[ent->client->ps.forcePowerLevel[FP_DESTRUCTION]]; // we don't want it to ever bounce missile->bounceCount = 0; if ( traceEnt && traceEnt->client && traceEnt->client->ps.powerups[PW_GALAK_SHIELD] ) { //has shield up missile->damage = 0; missile->splashDamage = 0; } int modPowerLevel = -1; if (traceEnt->client) { modPowerLevel = WP_AbsorbConversion(traceEnt, traceEnt->client->ps.forcePowerLevel[FP_ABSORB], ent, FP_DESTRUCTION, ent->client->ps.forcePowerLevel[FP_DESTRUCTION], 1); } if (modPowerLevel != -1) { if ( !modPowerLevel ) { damage = 0; } else if ( modPowerLevel == 1 ) { damage = floor((float)damage/4.0f); } else if ( modPowerLevel == 2 ) { damage = floor((float)damage/2.0f); } else if ( modPowerLevel == 3 ) { damage = floor((float)damage/1.0f); } else if ( modPowerLevel == 4 ) { damage = floor((float)damage/0.5f); } else if ( modPowerLevel == 5 ) { damage = floor((float)damage/0.25f); } else if ( modPowerLevel == 6 ) { damage = floor((float)damage/0.12f); } else if ( modPowerLevel == 7 ) { damage = floor((float)damage/0.06f); } else if ( modPowerLevel == 8 ) { damage = floor((float)damage/0.03f); } else if ( modPowerLevel > 8 ) { damage = floor((float)damage/0.01f); } } }I get the warning "error C3861: 'ForceDestructionMissile': identifier not found" whenever I put "ForceDestructionMissile" into "ForceDestructionShoot" . Is there anything I need to add to it, or do I need to edit another line of code?
  20. Alright I've tried everything with this power... Like I said in another post, I have absolutely no idea what I have to do with it. If anyone's played MB2's "Full Authentic" mode, you might have seen Destruction used in a match; That's what I'm trying to do with it.
  21. Did you try double-clicking on the stated error?
×
×
  • Create New...