-
Posts
2,023 -
Joined
-
Last visited
Content Type
Profiles
News Articles
Tutorials
Forums
Downloads
Everything posted by Asgarath83
-
Pretty, interessing... lol, guys, you misunderstanding me. my question is not about to do a mod like that, but about the tecnical trouble that can occours a project like that. ramikad given me a nice question. for "open" world, well, i see that JKA cannot archive an very "open" world. what i mean is: a large interconnected shaped terrains map of laaarge territories, filled, with temples, ruins, city doors, etc, that lead to small maps stand alone dungeons or other cities. so, yes, it's like @ told. a some kind of inter-connetcted maps with also the possibilities of doing space \ atmospheric battles... but for the last point, there are the @@Ramikad technical limitation. Vehicles are not scriptables.... mmmm... foolish idea but maybe is possible to make something of that with NPC... if NPC model is a fighter and with spawnscript you set gravity to zero and NPC ai as droid for explode when die, shoud works. the trouble is... to set NPC to go ever automatically forward at a certain speed. mmm, maybe CLASS_SENTRY and CLASS_INTERROGATOR can be a workarounds for fighters... SENTRY, in special mode. CLASS_ATST can be use for tanks and atst - atpt walkers, i guess. cruisers \ stations can did with MD3 and funcs entities i guess. i am curious to read about this JO project, however.
-
Well, is just a question of technical kind. is possible with JKA engine doing some space flight simulation like X wing alliance and rogue squadron 3d, mixed to some kind of open world game like skyrim or other rpg\ mmorpg?
-
Please not ask me more help for modding project. at max i can give you suggests. i have heal problems and i cannot manage any project at moment.
- Show previous comments 13 more
-
Maybe is natural + Gas (co2 and ch4 firsts ) by industries and car smog. but i have doubt about that because industries exist by 1700 and car by 1900. i suspect is caused by something else producted by human civilization in the last years there is not again discovered.
-
Aw, sorry man. i heavy misunderstood >.< uff. the insomnia going me crazy. Yes, Trump is funny sometimes XD. i am a lot doubtful about him as President. but also Clinton... mmm,... i got a lot of fear about her. because if she was the president of Usa... a conflict against Russia should be really close... very dangerous. Another Cold War. brrrr...
-
well, SP need just 3 files: the openjk_sp.x86.dll for executable, the jax86.dll for .dll and the vanilla sp dll for sp engine. i cannot help to you because also for me openjk never worked for MP pretty fine. i ever worked on SP and was a SP modder (now i left for heal trouble) for me SP worked very fine. the 3 tutorial for SP weapon,. force power and saber color are mine and i very happy that you can found useful one of that. for MP code, you need to ask to some other... i never played and liked much MP and never interessed too much into MP mods. :\ i not understand much the MP code because i not dive it like the SP code, so i cannot help you. your error is maybe "run out of space before read ghouls model ajust miniheap size" or something else?
-
are you working to MP or SP code? into release are missing many files. SP exe and MP dll are missing. for explaint to you: assets0.pk3 <- data asset gameassets1.pk3 <- data asset gameassets2.pk3 <- data asset gamecgamex86.dll <- MP dllgames.logjagamex86.dll <- SP dlljampconfig.cfg <- MP config file.jampgamex86.dll <- MP dll...uix86.dll <- MP ui.dll jasp and jamp are the original exe for SP and MP. for openjk, openjk.x86 and openjk_sp.x86 are the exe for MP and SP. what you need to build: - dll for replace the SP and MP dlls. - the two executable i told, and you need to run the game NOT with jasp and jamp but with this openjk exe files, after you replace the dll with edited dlls. for this, i warn you to make a back up of old exe and dll of JKA before overwrite they. or if you wanna restore the oroiginal game you need to setup it again.
-
1 install Jedi Knight jedi academy 2 patch to 1.0 version 3: Do a back of all original Dll and exe (jamp, jasp) files in some folder... maybe better put this folder inside Gamedata. for example i have a folder called "oldexe" and inside i get all dll and exe file of original game. 4: debugging i am not much sure, with me never worked much fine. the debug version of dll and exe allows coder to test in real time the code and fix bug and interruption and exception during game. the release version is the stable version of your custom code. you need basically to overwrite dll and exe original. your edit are for SP or MP? for MP you need to replace uix86.dll, cgamex86 , jampx86.dll and run with openjk_ded or openjk.exe rdsp vanila is the single player engine, the other vanilla is the mp engine. single players: jasp.exe is original SP exe. jaspx86.dll is the dll of the SP, openjk_spx86.dll is the exe you build with openjk and this exe need to be runned for test game edits into SP, after you past it into gamedata folder and overwrite the SP dll
-
-
mmm if i remember, lightningdiffuse \ specular works good for glm models, vertex for 2d shaders (like flags and banners). for brush and MD3 models should use rgbgen identity. maybe there is some reflective entity glass on some map game that allow to check how is the shader for a func_entity brush with light specular surface... maybe some glass door. models/map_objects/pillars/symbol4 { surfaceparm trans q3map_material rock q3map_onlyvertexlighting { map models/map_objects/pillars/symbol4 blendFunc GL_ONE GL_ZERO detail rgbGen identity } { map models/map_objects/pillars/symbol4 blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA detail } { map $lightmap blendFunc GL_DST_COLOR GL_ZERO rgbGen identity detail } } maybe this shader parameters of my mod can be of help. a metallic weapons example maybe can be of more help: models/weapons2/concussion/gun { { map models/weapons2/concussion/gun blendFunc GL_ONE GL_ZERO } { map models/weapons2/concussion/spec blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_AKPHA detail alphaGen lightingSpecular } { map models/map_objects/cda/marble_env6 blendFunc GL_DST_COLOR GL_ZERO alphaGen const 0.5 tcGen enviroment
-
Multiple Mindtrick & NPC sound detection while blinded?
Asgarath83 replied to JediBantha's topic in Coding and Scripts
ah yes, need also these two little functions... void DarkDamage( gentity_t *self, gentity_t *enemy, vec3_t location, int damageLevel7 ) {// DANNO INFLITTO DAL GLIFO A SECONDA DEL LIVELLO DI POTENZA E MOD ELEMENTALE. IL GLIFO DI FORZA NON HA ELEMENTO QUINDI NON HA MOD switch (damageLevel7) { case FORCE_LEVEL_1: G_Damage( enemy, self, self, NULL, location, 0, DAMAGE_NO_KNOCKBACK, MOD_BRYAR ); break; case FORCE_LEVEL_2: G_Damage( enemy, self, self, NULL, location, 30, DAMAGE_NO_KNOCKBACK, MOD_BRYAR_ALT ); break; case FORCE_LEVEL_3: G_Damage( enemy, self, self, NULL, location, 50, DAMAGE_NO_KNOCKBACK, MOD_BRYAR_ALT ); break; default: break; } } and obviously the timer setting: like the confusiontime int DarkGlyphTime[NUM_FORCE_POWER_LEVELS] = { 0,//none 10000,//5000, 15000,//10000, 20000//15000 };this is just facoltative, in wp_forcepowerrun static void case FP_DARKGLYPH: // Se tieni premuto F il glifo si carica. if ( (!self->s.number && !(cmd->buttons&BUTTON_USE_FORCE)) ) { WP_ForcePowerStop( self, FP_DARKGLYPH ); return; } // Animazione carica else if ( self->client->ps.repulseChargeStart && WP_ForcePowerAvailable(self, FP_DARKGLYPH, forcePowerNeeded[FP_DARKGLYPH] + 5) ) { // SET ANIMATION FOR LEVEL 1, 2, 3, PER IL PLAYER if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_1 ) { NPC_SetAnim( self, SETANIM_BOTH, BOTH_SPINATTACK7, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); // FAI SCAGLIAR IL POTERE AL 22 FOTOGRAMMA! if ( self->client->ps.torsoAnimTimer < 100 ){//Fixa questo valore per farla andar in loop... self->client->ps.torsoAnimTimer = 100; } if ( self->client->ps.legsAnimTimer < 100 ){//we were already playing this anim, we didn't want to restart it, but we want to hold it for at least 100ms, sooo.... self->client->ps.legsAnimTimer = 100; } if ( !Q_irand( 0, 4 ) ) // CONSUMO MANA { WP_ForcePowerDrain(self, FP_DARKGLYPH, 1); } VectorClear(self->client->ps.velocity); // Blocca il movimento del personaggio mentre lo casta. cmd->forwardmove = 0; cmd->rightmove = 0; cmd->upmove = 0; } else if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_2 ) { // mietitrice di Fumo NPC_SetAnim( self, SETANIM_BOTH, BOTH_SPINATTACK6, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); // FAI SCAGLIAR IL POTERE AL 22 FOTOGRAMMA! if ( self->client->ps.torsoAnimTimer < 100 ){//Fixa questo valore per farla andar in loop... self->client->ps.torsoAnimTimer = 100; } if ( self->client->ps.legsAnimTimer < 100 ){//we were already playing this anim, we didn't want to restart it, but we want to hold it for at least 100ms, sooo.... self->client->ps.legsAnimTimer = 100; } if ( !Q_irand( 0, 4 ) ) // CONSUMO MANA { WP_ForcePowerDrain(self, FP_DARKGLYPH, 1); } VectorClear(self->client->ps.velocity); // Blocca il movimento del personaggio mentre lo casta. cmd->forwardmove = 0; cmd->rightmove = 0; cmd->upmove = 0; } else if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_3 ) { if ( self->client->NPC_class == CLASS_REBORN || self->client->NPC_class == CLASS_KYLE || self->client->NPC_class == CLASS_ALORA || self->client->NPC_class == CLASS_MONMOTHA || self->client->NPC_class == CLASS_TUSKEN || self->client->NPC_class == CLASS_GLIDER || self->client->NPC_class == CLASS_NOGHRI || self->client->NPC_class == CLASS_GRAN || self->client->NPC_class == CLASS_SWAMPTROOPER || self->client->NPC_class == CLASS_WAMPA ) { NPC_SetAnim( self, SETANIM_BOTH, BOTH_VICTORY_STRONG, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); // FAI SCAGLIAR IL POTERE AL 22 FOTOGRAMMA! if ( self->client->ps.torsoAnimTimer < 100 ){//Fixa questo valore per farla andar in loop... self->client->ps.torsoAnimTimer = 100; } if ( self->client->ps.legsAnimTimer < 100 ){//we were already playing this anim, we didn't want to restart it, but we want to hold it for at least 100ms, sooo.... self->client->ps.legsAnimTimer = 100; } if ( !Q_irand( 0, 4 ) ) // CONSUMO MANA { WP_ForcePowerDrain(self, FP_DARKGLYPH, 1); } VectorClear(self->client->ps.velocity); // Blocca il movimento del personaggio mentre lo casta. cmd->forwardmove = 0; cmd->rightmove = 0; cmd->upmove = 0; } else { NPC_SetAnim( self, SETANIM_BOTH, BOTH_SPINATTACK7, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); // FAI SCAGLIAR IL POTERE AL 22 FOTOGRAMMA! if ( self->client->ps.torsoAnimTimer < 100 ){//Fixa questo valore per farla andar in loop... self->client->ps.torsoAnimTimer = 100; } if ( self->client->ps.legsAnimTimer < 100 ){//we were already playing this anim, we didn't want to restart it, but we want to hold it for at least 100ms, sooo.... self->client->ps.legsAnimTimer = 100; } if ( !Q_irand( 0, 4 ) ) // CONSUMO MANA { WP_ForcePowerDrain(self, FP_DARKGLYPH, 1); } VectorClear(self->client->ps.velocity); // Blocca il movimento del personaggio mentre lo casta. cmd->forwardmove = 0; cmd->rightmove = 0; cmd->upmove = 0; } } else { WP_ForcePowerStop( self, FP_DARKGLYPH ); // se il cast fallisce, blocca il potere. return; } } break; casting animation + force power consume + lock player commands for casting duration. about the force power: the force power act in 2 separate moment: the first moment is the void darkglyph function. it just make animation \ sound \ effect of player that cast the power, is not much different by mindtrick code. the darkglyph function calls the darkglyphthrow function. this shoot the shockwave of pushing. the enemy pushed, can get effect much different by be simple pushed like original force repulse: in the case of level 1, they not detect the player for a few second. is like a mindtrick code with a shockwave and all enemy hitted by the shockwave are blinded. i think is very similar of what you want to do. NOTE: confusion, as mean into SP code, for what i know not works on MP player clients. affected just the NPCs. i have not idea about how to blind the Multiplayer players with this power with the "cloaked disappering" of the opponent. sure should be funny into the FFA \ CTF mode XD i hope you can find your way for work that using my workaround of forcerepulse of JAE. good lock. -
Multiple Mindtrick & NPC sound detection while blinded?
Asgarath83 replied to JediBantha's topic in Coding and Scripts
Sorry for flooding . forum avoid me to do a unique post because split "post too long" message. the workaround of force repulse code was very long and trickly and forcerepulsethrow original code is very long. about how to cloak the player when cast the force power... add this in wp_forcepowerstop as a case in the switch. is just a graphical effect for cloack the player like a saboteur when cast the power, but is pretty cool to see. case FP_DARKGLYPH: if (self->client->ps.repulseChargeStart) { // QUANDO CASTA L'ONDA D'URTO DarkGlyphThrow(self, level.time - self->client->ps.repulseChargeStart); // SCAGLIALA! self->client->ps.repulseChargeStart = 0; // Resetta tutto. if ( self && self->client && self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_1) { // Invisibility enabled. self->s.powerups |= ( 1 << PW_CLOAKED ); self->client->ps.powerups[PW_CLOAKED] = cg.time + 10000; } else if ( self && self->client && self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_2) { // Invisibility enabled. if ( self && self->client->NPC_class == CLASS_KYLE || self && self->client->NPC_class == CLASS_REBORN || self && self->client->NPC_class == CLASS_WAMPA || self && self->client->NPC_class == CLASS_MONMOTHA ) { return; /*self->s.powerups |= ( 1 << PW_CLOAKED ); self->client->ps.powerups[PW_CLOAKED] = cg.time + 15000;*/ } else { self->s.powerups |= ( 1 << PW_CLOAKED ); self->client->ps.powerups[PW_CLOAKED] = cg.time + 15000; } } else if ( self && self->client && self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_3) { // Invisibility enabled. if ( self && self->client && self->client->NPC_class == CLASS_REBORN || self && self->client && self->client->NPC_class == CLASS_KYLE || self && self->client && self->client->NPC_class == CLASS_ALORA || self && self->client && self->client->NPC_class == CLASS_MONMOTHA || self && self->client && self->client->NPC_class == CLASS_TUSKEN || self && self->client && self->client->NPC_class == CLASS_GLIDER || self && self->client && self->client->NPC_class == CLASS_NOGHRI || self && self->client && self->client->NPC_class == CLASS_GRAN || self && self->client && self->client->NPC_class == CLASS_SWAMPTROOPER || self && self->client && self->client->NPC_class == CLASS_WAMPA ) { return; } else { self->s.powerups |= ( 1 << PW_CLOAKED ); self->client->ps.powerups[PW_CLOAKED] = cg.time + 20000; } } } break; -
Multiple Mindtrick & NPC sound detection while blinded?
Asgarath83 replied to JediBantha's topic in Coding and Scripts
else // VOID REAVER { // CLASSI SU CUI FA EFFETTO if ( push_list[x] && push_list[x]->client ) { switch ( push_list[x]->client->NPC_class ) { // BLINDED, And DAMAGED case CLASS_SABER_DROID: case CLASS_PROTOCOL: case CLASS_ASSASSIN_DROID: case CLASS_MORGANKATARN: // HEAVY DAMAGED // tutti gli elementali e i boss non posson esser stunnati! if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; if ( push_list[x]->ghoul2.size() && push_list[x]->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/void" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_PlayEffect( G_EffectIndex( "reavers/vacuumimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.eyePoint, 50, DAMAGE_NO_KNOCKBACK, MOD_BRYAR_ALT ); // NOT SUCK THE LIGHT ELEMENTAL THEY HAVE NO MASS AND RESIST TO DARKNESS, JUST DAMAGE! } if ( PM_HasAnimation( push_list[x], BOTH_COWER1 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_COWER1, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_COWER1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer += 20000; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; }; break; // Mortals creatures: blinded, chocked, damaged! case CLASS_RODIAN: case CLASS_PRISONER: case CLASS_TRANDOSHAN: case CLASS_STORMTROOPER: case CLASS_IMPWORKER: case CLASS_IMPERIAL: case CLASS_SWAMP: case CLASS_INTERROGATOR: case CLASS_GALAK: if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; push_list[x]->flags ^= FL_NOTARGET; soundIndex = G_SoundIndex( va("sound/weapons/Dark_Reaver/darkreavershadows%d.wav", Q_irand( 1, 4 ) ) ); if ( push_list[x]->ghoul2.size() && push_list[x]->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/void" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_PlayEffect( G_EffectIndex( "reavers/vacuumimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.eyePoint, 50, DAMAGE_NO_KNOCKBACK, MOD_BRYAR_ALT ); // NOW SUCK THEM! if ( PM_InKnockDown( &push_list[x]->client->ps ) ) { continue; } WP_ForceKnockdown ( push_list[x], self, suck, (!suck&&knockback>150), qfalse ); // VectorSubtract( push_list[x]->currentOrigin, self->currentOrigin, pushDir ); if ( suck ) { VectorSubtract( push_list[x]->currentOrigin, self->currentOrigin, pushDir ); } } if ( PM_HasAnimation( push_list[x], BOTH_CHOKE1 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_CHOKE1, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_CHOKE1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer += 20000; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; } break; // VAMPIRES, UNDEADS, Monsters, Sucked and damaged. case CLASS_REBORN: case CLASS_JEDI: case CLASS_LUKE: case CLASS_KYLE: case CLASS_ALORA: case CLASS_MONMOTHA: case CLASS_TUSKEN: case CLASS_GLIDER: case CLASS_NOGHRI: case CLASS_FLIER2: case CLASS_REELO: case CLASS_WEEQUAY: case CLASS_LIZARD: case CLASS_SWAMPTROOPER: case CLASS_FISH: case CLASS_COMMANDO: case CLASS_TAVION: case CLASS_MINEMONSTER: case CLASS_WAMPA: case CLASS_BARTENDER: case CLASS_UGNAUGHT: soundIndex = G_SoundIndex( va("sound/weapons/Vacuum_Reaver/vacuumreavershadows%d.wav", Q_irand( 1, 4 ) ) ); if ( push_list[x]->ghoul2.size() && push_list[x]->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "reavers/voidimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.eyePoint, 35, DAMAGE_NO_KNOCKBACK, MOD_BRYAR_ALT ); // NOW SUCK THEM! if ( PM_InKnockDown( &push_list[x]->client->ps ) ) { continue; } WP_ForceKnockdown ( push_list [x], self, suck, qfalse, qtrue ); } if ( PM_HasAnimation( push_list[x], BOTH_COWER1 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_COWER1, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_COWER1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer += 5000; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; } break; // Golem, artifact, they resist to void power. Just damaged, not sucked. case CLASS_MARK1: case CLASS_MARK2: case CLASS_R2D2: case CLASS_R5D2: case CLASS_HAZARD_TROOPER: case CLASS_GALAKMECH: case CLASS_GONK: if ( push_list[x]->ghoul2.size() && push_list[x]->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "reavers/voidimpactbody" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.eyePoint, 25, DAMAGE_NO_KNOCKBACK, MOD_BRYAR_ALT ); } break; default: break; } } } } if ( (push_list[x]->client->ps.forcePowersActive&(1<<FP_GRIP)) //&& push_list[x]->client->ps.forcePowerDebounce[FP_GRIP] < level.time && push_list[x]->client->ps.forceGripEntityNum == self->s.number ) { WP_ForcePowerStop( push_list[x], FP_GRIP ); } if ( (push_list[x]->client->ps.forcePowersActive&(1<<FP_DRAIN)) //&& push_list[x]->client->ps.forcePowerDebounce[FP_DRAIN] < level.time && push_list[x]->client->ps.forceDrainEntityNum == self->s.number ) { WP_ForcePowerStop( push_list[x], FP_DRAIN ); } } if ( Rosh_BeingHealed( push_list[x] ) ) { continue; } if ( fake ) {//always resist // WP_ResistForcePush( push_list[x], self, qfalse ); continue; } int powerLevel, powerUse; powerLevel = self->client->ps.forcePowerLevel[FP_DARKGLYPH]; powerUse = FP_DARKGLYPH; // LA CONTROMAGIA ASSORBE IL GLIFO E LO NEUTRALIZZA int modPowerLevel = WP_AbsorbConversion( push_list[x], push_list[x]->client->ps.forcePowerLevel[FP_ABSORB], self, powerUse, powerLevel, forcePowerNeeded[self->client->ps.forcePowerLevel[powerUse]] ); // QUESTE CLASSI SON RESISTENTI AL POTERE DELLE TENEBRE if (push_list[x]->client->NPC_class==CLASS_SABOTEUR || push_list[x]->client->NPC_class==CLASS_BESPIN_COP || push_list[x]->client->NPC_class==CLASS_SHADOWTROOPER || push_list[x]->client->NPC_class==CLASS_JAN || push_list[x]->client->NPC_class==CLASS_DESANN || push_list[x]->client->NPC_class==CLASS_HOWLER || push_list[x]->client->NPC_class==CLASS_MURJJ || push_list[x]->client->NPC_class==CLASS_GALAKMECH || push_list[x]->client->NPC_class==CLASS_ATST || push_list[x]->client->NPC_class==CLASS_MOUSE || push_list[x]->client->NPC_class==CLASS_JAWA || push_list[x]->client->NPC_class==CLASS_RANCOR || push_list[x]->client->NPC_class==CLASS_SAND_CREATURE || push_list[x]->client->NPC_class==CLASS_KYLE || push_list[x]->client->NPC_class==CLASS_LUKE ) { WP_ResistForcePush( push_list[x], self, qfalse ); modPowerLevel = 0; // devides throw by 10 } //First, if this is the player we're push/pulling, see if he can counter it if ( modPowerLevel != -1 && InFront( self->currentOrigin, push_list[x]->client->renderInfo.eyePoint, push_list[x]->client->ps.viewangles, 0.3f ) ) // SE IL LIVELLO DI CONTROMAGIA E' A 3, ESSO VIENE BLOCCATO DA TUTTI! {//absorbed and I'm in front of them //counter it if ( push_list[x]->client->ps.forcePowerLevel[FP_ABSORB] > FORCE_LEVEL_2 ) {//no reaction at all } else { WP_ResistForcePush( push_list[x], self, qfalse ); push_list[x]->client->ps.saberMove = push_list[x]->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in push_list[x]->client->ps.saberBlocked = BLOCKED_NONE; } continue; } else if ( !push_list[x]->s.number ) // ALTRIMENTI CERCHERANNON DI RESISTERE {//player if ( ShouldPlayerResistForceThrow(push_list[x], self, qfalse) ) { // WP_ResistForcePush( push_list[x], self, qfalse ); push_list[x]->client->ps.saberMove = push_list[x]->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in push_list[x]->client->ps.saberBlocked = BLOCKED_NONE; continue; } } else if ( push_list[x]->client && Jedi_WaitingAmbush( push_list[x] ) ) { WP_ForceKnockdown( push_list[x], self, qfalse, qtrue, qfalse ); DarkDamage( self, push_list[x], tr.endpos, damageLevel7 ); continue; } // L'ONDA D'URTO LIBERA COLORO CHE SON SOTTO L'ABBRACCIO DI UN VAMPIRO! if ( push_list[x]->client->ps.forceDrainEntityNum == self->s.number && (self->s.eFlags&EF_FORCE_DRAINED) ) {//stop them from draining me now, dammit! WP_ForcePowerStop( push_list[x], FP_DRAIN ); } //okay, everyone else (or player who couldn't resist it)... Condizioni di resistenza al glifo. if ( ((self->s.number == 0 && Q_irand( 0, 2 ) ) || Q_irand( 0, 2 ) ) && push_list[x]->client && push_list[x]->health > 0 //è vivo // && push_list[x]->client->ps.weapon == WP_SABER // è armato di spada && push_list[x]->health > 0 // è vivo && push_list[x]->client->ps.forceRageRecoveryTime < level.time // ha appena finito di usar la Furia. && ((self->client->NPC_class != CLASS_DESANN&&Q_stricmp("Yoda",self->NPC_type)) || !Q_irand( 0, 2 ) )// QUESTE CLASSI RESISTONO CON UN FORCE PUSH AL 30% di possiblità && push_list[x]->client->ps.groundEntityNum != ENTITYNUM_NONE //on the ground && InFront( self->currentOrigin, push_list[x]->currentOrigin, push_list[x]->client->ps.viewangles, 0.3f ) //è di fronte && ( push_list[x]->client->ps.powerups[PW_FORCE_PUSH] > level.time ||//sta sparando un colpo cinetico (push_list[x]->s.number != 0 && push_list[x]->client->ps.weaponTime < level.time)//not the player and not attacking (NPC jedi auto-defend against pushes) ) ) {//Jedi don't get pushed, they resist as long as they aren't already attacking and are on the ground // SE UNO SPADACCINO TOCCA TERRA, RESISTE! if ( push_list[x]->client->ps.saberLockTime > level.time ) {//they're in a lock if ( push_list[x]->client->ps.saberLockEnemy != self->s.number ) {//they're not in a lock with me continue; } // RESISTONO SE IL GLIFO E' PIU' DEBOLE DEL COLPO CINETICO else if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] < FORCE_LEVEL_3 || push_list[x]->client->ps.forcePowerLevel[FP_ABSORB] > FORCE_LEVEL_2 ) {//they're in a lock with me, but my push is too weak continue; } else {// Saranno sbattuti self->painDebounceTime = 0; self->client->ps.weaponTime = 500; if ( self->client->ps.forcePowersActive&(1<<FP_SPEED) ) { self->client->ps.weaponTime = floor( self->client->ps.weaponTime * g_timescale->value ); } } } // PROBABILITA' DI RESISTENZA A SECONDA DEL LIVELLO DI DIFFICOLTA' int resistChance = Q_irand(0, 2); if ( push_list[x]->s.number >= MAX_CLIENTS ) {//NPC if ( g_spskill->integer == 1 ) {//stupid tweak for graham resistChance = Q_irand(0, 3); } } if ( modPowerLevel == -1 && self->client->ps.forcePowerLevel[FP_WATERGLYPH] > FORCE_LEVEL_2 && !resistChance && push_list[x]->client->ps.forcePowerLevel[FP_WATERGLYPH] < FORCE_LEVEL_3 ) {//Glifo di Forza livello 3 spinge sempre gli spadaccini if ( PM_InKnockDown( &push_list[x]->client->ps ) ) {//can't knock them down again continue; } WP_ForceKnockdown( push_list[x], self, qfalse, qfalse, qtrue ); DarkDamage( self, push_list[x], tr.endpos, damageLevel7 ); } else { // WP_ResistForcePush( push_list[x], self, qfalse ); } } else { //UGH: FIXME: for enemy jedi, they should probably always do force pull 3, and not your weapon (if player?)! //shove them if ( push_list[x]->NPC && push_list[x]->NPC->jumpState == JS_JUMPING ) {// L'ONDA D'URTO NON BLOCCA CHI SALTA WP_ResistForcePush( push_list[x], self, qfalse ); push_list[x]->forcePushTime = level.time + 600; // let the push effect last for 600 ms continue; } if ( push_list[x]->s.number && (push_list[x]->message || (push_list[x]->flags&FL_NO_KNOCKBACK)) ) {// NON FA EFFETTO SU CHI HA CHIAVI. PUO' DROPPAR LA CHIAVE //don't push me... FIXME: maybe can pull the key off me? WP_ForceKnockdown( push_list[x], self, qfalse, qfalse, qfalse ); DarkDamage( self, push_list[x], tr.endpos, damageLevel7 ); continue; } { // Fix potenza urto VectorSubtract( push_list[x]->currentOrigin, self->currentOrigin, pushDir ); knockback -= VectorNormalize( pushDir ); if ( knockback < 0/* -400 Void Knockback */ ) { knockback = 0; } //glifo di forza a uno, l'onda d'urto è ridotta ad un terzo di potenza if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_1 ) {//maybe just knock them down knockback = 0; } else if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_2 ) {//maybe just knock them down knockback = 0;// FUMO } else if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_3 ) { if ( self->client->NPC_class == CLASS_KYLE || self->client->NPC_class == CLASS_REBORN || self->client->NPC_class == CLASS_WAMPA || self->client->NPC_class == CLASS_GRAN || self->client->NPC_class == CLASS_ALORA || self->client->NPC_class == CLASS_MONMOTHA || self->client->NPC_class == CLASS_TUSKEN || self->client->NPC_class == CLASS_GLIDER || self->client->NPC_class == CLASS_NOGHRI || self->client->NPC_class == CLASS_SWAMPTROOPER ) {//NATURE knockback = 200/*suck?0:200*/ /*-400*/; } else {//Void need to suck the enemies! But How??? knockback = -200; suck = -200; } } // Glifo a livello 3. Super onda d'urto!!! else if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] > FORCE_LEVEL_3 ) {//super-hard push //Hmm, maybe in this case can even nudge/knockdown a jedi? Especially if close? knockback = suck?0:700; // QUA METTERE CODICE RISUCCHIO } } if ( modPowerLevel != -1 ) { if ( !modPowerLevel ) { knockback /= 10.0f; } else if ( modPowerLevel == 1 ) { knockback /= 6.0f; } else// if ( modPowerLevel == 2 ) { knockback /= 2.0f; } } // Spinge gli avversari G_Throw( push_list[x], pushDir, knockback ); //make it so they don't actually hurt me when pulled at me... push_list[x]->forcePuller = self->s.number; if ( push_list[x]->client->ps.groundEntityNum != ENTITYNUM_NONE ) {// Se i nemici si trovano al suolo, l'urto viene bilanciato. if ( push_list[x]->client->ps.velocity[2] < knockback ) { push_list[x]->client->ps.velocity[2] = knockback; } } if ( push_list[x]->health > 0 ) {//target is still alive if ( (push_list[x]->s.number||(cg.renderingThirdPerson&&!cg.zoomMode)) //NPC or 3rd person player && ((self->client->ps.forcePowerLevel[FP_DARKGLYPH] < FORCE_LEVEL_2 && push_list[x]->client->ps.forcePowerLevel[FP_ABSORB] < FORCE_LEVEL_1)) ) {//NPC or third person player (without force push/pull skill), and force push/pull level is at 1 // Se glifo forza è a liv 1 e l'avversario non oppone resistenza WP_ForceKnockdown( push_list[x], self, qfalse, (knockback>150), qfalse ); DarkDamage( self, push_list[x], tr.endpos, damageLevel7 ); } else if ( !push_list[x]->s.number ) {//player, have to force an anim on him WP_ForceKnockdown( push_list[x], self, qfalse, (knockback>150), qfalse ); DarkDamage( self, push_list[x], tr.endpos, damageLevel7 ); } else {//NPC and force-push/pull at level 2 or higher WP_ForceKnockdown( push_list[x], self, qfalse, (knockback>100), qfalse ); DarkDamage( self, push_list[x], tr.endpos, damageLevel7 ); } } push_list[x]->forcePushTime = level.time + 600; // Durata dell'Onda, 0.6 secondi. } } else if ( !fake ) {//not a fake push/pull // LUCE, FULMINE E RADIANZA NON POSSONO DANNEGGIARE VETRI O RESPINGERE OGGETTI. // SE UNA SPADA AGLIATA CONTRO CHI LANCIA L'ONDA D'URTO, L'ONDA LA FA RITORNARE AL MITTENTE! // l'onda respinge le granate. if ( push_list[x]->s.eType == ET_MISSILE && push_list[x]->s.pos.trType != TR_STATIONARY && (push_list[x]->s.pos.trType != TR_INTERPOLATE||push_list[x]->s.weapon != WP_THERMAL) )//rolling and stationary thermal detonators are dealt with below { vec3_t dir2Me; VectorSubtract( self->currentOrigin, push_list[x]->currentOrigin, dir2Me ); float dot = DotProduct( push_list[x]->s.pos.trDelta, dir2Me ); if ( push_list[x]->s.eFlags&EF_MISSILE_STICK ) {//Proiettili metallici (cannone alchimista, vengon respinti) push_list[x]->s.eType = ET_MISSILE; push_list[x]->s.eFlags &= ~EF_MISSILE_STICK; push_list[x]->s.eFlags |= EF_BOUNCE_HALF; push_list[x]->splashDamage /= 1; push_list[x]->splashRadius /= 1; push_list[x]->e_ThinkFunc = thinkF_WP_Explode; push_list[x]->nextthink = level.time + Q_irand( 500, 3000 ); } if ( dot >= 0 ) {//it's heading towards me G_ReflectMissile( self, push_list[x], forward ); } else { VectorScale( push_list[x]->s.pos.trDelta, 1.25f, push_list[x]->s.pos.trDelta ); } //deflect sound //G_Sound( push_list[x], G_SoundIndex( va("sound/weapons/blaster/reflect%d.wav", Q_irand( 1, 3 ) ) ) ); //push_list[x]->forcePushTime = level.time + 600; // let the push effect last for 600 ms // PUO' RESPINGEREE I PROIETTILI CINETICI D'ARIA?? (io la togleirei... ) if ( push_list[x]->s.eType == ET_MISSILE && push_list[x]->s.weapon == WP_BOWCASTER && push_list[x]->damage < 20 ) {//pushing away a rocket raises it's damage to the max for NPCs push_list[x]->damage = 20; } } // UN MURO D'ACQUA O UN'ONDA DI GHIACCIO O CRISTALLO SICURAMENTE SPACCA QUALCOSA FRAGILE COME IL VETRO! else if ( push_list[x]->svFlags & SVF_GLASS_BRUSH ) {//break the glass trace_t tr; vec3_t pushDir; float damage = 0; AngleVectors( self->client->ps.viewangles, forward, NULL, NULL ); VectorNormalize( forward ); VectorMA( self->client->renderInfo.eyePoint, radius, forward, end ); gi.trace( &tr, self->client->renderInfo.eyePoint, vec3_origin, vec3_origin, end, self->s.number, MASK_SHOT, (EG2_Collision)0, 0 ); if ( tr.entityNum != push_list[x]->s.number || tr.fraction == 1.0 || tr.allsolid || tr.startsolid ) {//must be pointing right at it continue; } VectorSubtract( tr.endpos, self->client->renderInfo.eyePoint, pushDir ); damage -= VectorNormalize( pushDir ); if ( damage < 0 ) { damage = 0; } VectorScale( pushDir, damage, pushDir ); G_Damage( push_list[x], self, self, pushDir, tr.endpos, damage, 0, MOD_BRYAR_ALT ); } } } // COSTO MANA WP_ForcePowerDrain(self, FP_DARKGLYPH, cost); if ( self->NPC ) // A seconda della loro abilità gli NPC resistono più o meno bene. {//NPCs can push more often //FIXME: vary by rank and game skill? self->client->ps.forcePowerDebounce[FP_DARKGLYPH] = level.time + 200; } else { self->client->ps.forcePowerDebounce[FP_DARKGLYPH] = level.time + self->client->ps.torsoAnimTimer + 500; } } -
Multiple Mindtrick & NPC sound detection while blinded?
Asgarath83 replied to JediBantha's topic in Coding and Scripts
// LIVELLO 2; FUMO if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_2 && push_list[x]->s.weapon != WP_NONE //don't charm people who aren't capable of fighting... like ugnaughts and droids, just confuse them && !Pilot_AnyVehiclesRegistered()) {//FA EFFETTO SOLO SULLE SEGUENTI CLASSI // CLASSI SU CUI FA EFFETTO if ( push_list[x] && push_list[x]->client ) { switch ( push_list[x]->client->NPC_class ) { // BLINDED, HEAVY DAMAGED, NOT GASPING. case CLASS_SABER_DROID: case CLASS_PROTOCOL: case CLASS_ASSASSIN_DROID: case CLASS_MORGANKATARN: // HEAVY DAMAGED // tutti gli elementali e i boss non posson esser stunnati! if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; if ( push_list[x]->ghoul2.size() && push_list[x]->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/smog" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_PlayEffect( G_EffectIndex( "reavers/smogimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.eyePoint, 30, DAMAGE_NO_KNOCKBACK, MOD_BRYAR_ALT ); } if ( PM_HasAnimation( push_list[x], BOTH_COWER1 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_COWER1, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_COWER1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer += 200; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; }; break; // Humans and mortal creatures: blinded, chocked! case CLASS_RODIAN: case CLASS_PRISONER: case CLASS_TRANDOSHAN: case CLASS_STORMTROOPER: case CLASS_IMPWORKER: case CLASS_IMPERIAL: case CLASS_SWAMP: case CLASS_INTERROGATOR: case CLASS_ALORA: case CLASS_MONMOTHA: if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); } //FIXME: maybe pick an enemy right here? //FIXME: need a *charmed* timer on this...? Or do TEAM //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!!_PLAYERS assume that "confusion" means they should switch to team_enemy when done? push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; soundIndex = G_SoundIndex( va("sound/weapons/Smog_Reaver/smogreavershadows%d.wav", Q_irand( 1, 4 ) ) ); if ( push_list[x]->ghoul2.size() && push_list[x]->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/smog" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_PlayEffect( G_EffectIndex( "reavers/smogimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.eyePoint, 0, DAMAGE_NO_KNOCKBACK, MOD_BRYAR_ALT ); } if ( PM_HasAnimation( push_list[x], BOTH_CHOKE1 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_CHOKE1, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_CHOKE1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer += 15000; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; } break; // Damaged, but no Blinded! no work on undeads! case CLASS_TUSKEN: case CLASS_NOGHRI: case CLASS_GRAN: case CLASS_REBORN: case CLASS_JEDI: case CLASS_WEEQUAY: case CLASS_SWAMPTROOPER: case CLASS_COMMANDO: case CLASS_TAVION: case CLASS_MINEMONSTER: case CLASS_WAMPA: case CLASS_HAZARD_TROOPER: case CLASS_REBEL: case CLASS_BARTENDER: case CLASS_UGNAUGHT: case CLASS_REELO: soundIndex = G_SoundIndex( va("sound/weapons/Smog_Reaver/smogreavershadows%d.wav", Q_irand( 1, 4 ) ) ); if ( push_list[x]->ghoul2.size() && push_list[x]->torsoBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "reavers/smogimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.eyePoint, 20, DAMAGE_NO_KNOCKBACK, MOD_BRYAR_ALT ); } if ( PM_HasAnimation( push_list[x], BOTH_COWER1 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_COWER1, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_COWER1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer += 200; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; } // LOW DAMAGED, NO DMG ANIMATION, BOSSES. case CLASS_CLAW: case CLASS_JAN: case CLASS_GALAK: case CLASS_GLIDER: case CLASS_ROCKETTROOPER: case CLASS_MURJJ: case CLASS_LIZARD: case CLASS_FISH: case CLASS_FLIER2: soundIndex = G_SoundIndex( va("sound/weapons/Smog_Reaver/smogreavershadows%d.wav", Q_irand( 1, 4 ) ) ); if ( push_list[x]->ghoul2.size() && push_list[x]->torsoBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "reavers/smogimpactbody" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.eyePoint, 10, DAMAGE_NO_KNOCKBACK, MOD_BRYAR_ALT ); } break; default: break; } } } // LIVELLO 3, NATURA! if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_3 && push_list[x]->s.weapon != WP_NONE //don't charm people who aren't capable of fighting... like ugnaughts and droids, just confuse them && !Pilot_AnyVehiclesRegistered()) {//FA EFFETTO SOLO SULLE SEGUENTI CLASSI // NATURA ATK D'URTO // if ( self->client->NPC_class == CLASS_KYLE ||self->client->NPC_class == CLASS_REBORN || self->client->NPC_class == CLASS_ALORA ||self->client->NPC_class == CLASS_MONMOTHA || self->client->NPC_class == CLASS_TUSKEN ||self->client->NPC_class == CLASS_GLIDER || self->client->NPC_class == CLASS_NOGHRI ||self->client->NPC_class == CLASS_SWAMPTROOPER || self->client->NPC_class == CLASS_WAMPA ||self->client->NPC_class == CLASS_GRAN ) {//FA SOLO SULLE SEGUENTI CLASSI // NATURE REAVER. is deadly on undeads. stuck the enemies with ivies and inflict poison damage. // gli elementali di luce e Tenebre sono immuni agli effetti di questo elemento. if ( push_list[x] && push_list[x]->client ) { switch ( push_list[x]->client->NPC_class ) { // I VAMPIRI E I NON MORTI SUBISCONO UN DANNO FORTISSIMO, CON AVVELENAMENTO DA SACRO. case CLASS_REBORN: case CLASS_TUSKEN: case CLASS_NOGHRI: case CLASS_WEEQUAY: case CLASS_SWAMPTROOPER: case CLASS_GRAN: case CLASS_COMMANDO: case CLASS_ALORA: if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); push_list[x]->client->poisonDamage = 15; push_list[x]->client->poisonTime = 15000; } push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; if ( push_list[x]->ghoul2.size() && push_list[x]->torsoBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "vampire/natureimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_PlayEffect( G_EffectIndex( "force/poisoned" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin , level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/poisoned.mp3" ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.torsoPoint, 200, DAMAGE_NO_KNOCKBACK, MOD_DEMP2_ALT ); } if ( PM_HasAnimation( push_list[x], BOTH_SONICPAIN_HOLD ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_SONICPAIN_HOLD, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_SONICPAIN_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_HOLYGLYPH]]; }; break; // i boss subiscono danno da sacro + stordimento, ma non paralisi, case CLASS_MONMOTHA: case CLASS_GLIDER: case CLASS_FISH: case CLASS_FLIER2: case CLASS_LIZARD: case CLASS_CLAW: case CLASS_KYLE: case CLASS_DESANN: case CLASS_REELO: case CLASS_ATST: case CLASS_SAND_CREATURE: case CLASS_MOUSE: case CLASS_BOBAFETT: case CLASS_MURJJ: if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); push_list[x]->client->poisonDamage = 7; push_list[x]->client->poisonTime = 15000; } soundIndex = G_SoundIndex( va("sound/weapons/Dark_Reaver/darkreavershadows%d.wav", Q_irand( 1, 4 ) ) ); push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; if ( push_list[x]->ghoul2.size() && push_list[x]->torsoBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "vampire/natureimpactbody" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_PlayEffect( G_EffectIndex( "force/poisoned" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin , level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/poisoned.mp3" ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.torsoPoint, 100, DAMAGE_NO_KNOCKBACK, MOD_DEMP2_ALT ); } if ( PM_HasAnimation( push_list[x], BOTH_COWER1 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_COWER1, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_COWER1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; }; break; // Su umani e creature mortali la mietitrice di sacro non infligge danno tossico, in compenso stordisce a lungo. case CLASS_RODIAN: case CLASS_PRISONER: case CLASS_TRANDOSHAN: case CLASS_STORMTROOPER: case CLASS_IMPWORKER: case CLASS_IMPERIAL: case CLASS_GALAK: case CLASS_SWAMP: case CLASS_INTERROGATOR: if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); } push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; if ( push_list[x]->ghoul2.size() && push_list[x]->torsoBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "vampire/natureimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_PlayEffect( G_EffectIndex( "force/nature" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin, level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]] ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/Nature_Reaver/tentaclestrangolamento.mp3" ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.torsoPoint, 75, DAMAGE_NO_KNOCKBACK, MOD_DEMP2_ALT ); push_list[x]->painDebounceTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; // NO PAINS REACTIONS! push_list[x]->s.pos.trTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; // <- TEMPO STORDIMENTO WP_DeactivateSaber( push_list[x] ); // <- IMPORTANTE!! DISATTIVA LE SPADE. } if ( PM_HasAnimation( push_list[x], BOTH_PULLED_INAIR_F ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_PULLED_INAIR_F, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_PULLED_INAIR_F, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; }; break; // Su costrutti meccanici niente danno, ma paralisi. case CLASS_R2D2: case CLASS_R5D2: case CLASS_SEEKER: case CLASS_REMOTE: case CLASS_SENTRY: if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); } push_list[x]->NPC->confusionTime = level.time + HolyGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; if ( push_list[x]->ghoul2.size() && push_list[x]->torsoBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "vampire/natureimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_PlayEffect( G_EffectIndex( "force/nature" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/Nature_Reaver/tentaclestrangolamento.mp3" ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.torsoPoint, 50, DAMAGE_NO_KNOCKBACK, MOD_DEMP2_ALT ); push_list[x]->painDebounceTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; // NO PAINS REACTIONS! push_list[x]->s.pos.trTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; // <- TEMPO STORDIMENTO WP_DeactivateSaber( push_list[x] ); // <- IMPORTANTE!! DISATTIVA LE SPADE. if ( push_list[x] && push_list[x]->client ) { push_list[x]->s.powerups |= ( 1 << PW_SHOCKED ); push_list[x]->client->ps.powerups[PW_SHOCKED] = cg.time + 3000; } } if ( PM_HasAnimation( push_list[x], BOTH_PULLED_INAIR_F ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_PULLED_INAIR_F, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_PULLED_INAIR_F, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; }; break; // su spettri stordimento e danno sacro, No paralisi. case CLASS_JEDI: case CLASS_LUKE: case CLASS_JAWA: case CLASS_RANCOR: if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); push_list[x]->client->poisonDamage = 10; push_list[x]->client->poisonTime = 15000; } push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; if ( push_list[x]->ghoul2.size() && push_list[x]->torsoBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "vampire/natureimpactbody" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.torsoPoint, 75, DAMAGE_NO_KNOCKBACK, MOD_DEMP2_ALT ); WP_DeactivateSaber( push_list[x] ); // <- IMPORTANTE!! DISATTIVA LE SPADE. } if ( PM_HasAnimation( push_list[x], BOTH_KNEES2 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_KNEES2, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_KNEES2, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; }; break; // su Elementali: imprigionamento e un po' di danno. case CLASS_SABOTEUR: case CLASS_BESPIN_COP: case CLASS_SABER_DROID: case CLASS_ASSASSIN_DROID: case CLASS_HAZARD_TROOPER: case CLASS_REBEL: case CLASS_BARTENDER: case CLASS_UGNAUGHT: case CLASS_HOWLER: case CLASS_GONK: case CLASS_MARK1: case CLASS_MARK2: if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); } push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; if ( push_list[x]->ghoul2.size() && push_list[x]->torsoBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "vampire/natureimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_PlayEffect( G_EffectIndex( "force/nature" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin, level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/Nature_Reaver/tentaclestrangolamento.mp3" ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.torsoPoint, 80, DAMAGE_NO_KNOCKBACK, MOD_DEMP2_ALT ); push_list[x]->painDebounceTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; // NO PAINS REACTIONS! push_list[x]->s.pos.trTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; // <- TEMPO STORDIMENTO WP_DeactivateSaber( push_list[x] ); // <- IMPORTANTE!! DISATTIVA LE SPADE. } if ( PM_HasAnimation( push_list[x], BOTH_STAND1 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_STAND1, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_STAND1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; }; break; // On Demons creatures Holy poison damaged + Costription. case CLASS_TAVION: case CLASS_MINEMONSTER: case CLASS_WAMPA: if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); push_list[x]->client->poisonDamage = 20; push_list[x]->client->poisonTime = 15000; } push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; if ( push_list[x]->ghoul2.size() && push_list[x]->torsoBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "vampire/natureimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_PlayEffect( G_EffectIndex( "force/nature" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin, level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]] ); G_PlayEffect( G_EffectIndex( "force/poisoned" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/force/poisoned.mp3" ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/Nature_Reaver/tentaclestrangolamento.mp3" ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.torsoPoint, 200, DAMAGE_NO_KNOCKBACK, MOD_DEMP2_ALT ); push_list[x]->painDebounceTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; // NO PAINS REACTIONS! push_list[x]->s.pos.trTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; // <- TEMPO STORDIMENTO WP_DeactivateSaber( push_list[x] ); // <- IMPORTANTE!! DISATTIVA LE SPADE. } if ( PM_HasAnimation( push_list[x], BOTH_PULLED_INAIR_F ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_PULLED_INAIR_F, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_PULLED_INAIR_F, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; }; break; // l'attacco perpetrato sui demoni porterà ad un avvelenamento nei confronti di Kain! default: break; } } } -
Multiple Mindtrick & NPC sound detection while blinded?
Asgarath83 replied to JediBantha's topic in Coding and Scripts
darkglyphthrow function (this is the shockwave) void DarkGlyphThrow( gentity_t *self, int chargeTime7 ) { // CODICE DELL'ONDA D'URTO SONICA!!!! //shove things around you away qboolean fake = false; float dist; gentity_t *ent, *forwardEnt = NULL; gentity_t *entityList[MAX_GENTITIES]; gentity_t *push_list[MAX_GENTITIES]; int numListedEntities = 0; vec3_t mins, maxs; vec3_t v; int i, e; int ent_count = 0; int radius; vec3_t center, ent_org, size, forward, right, end, dir, fwdangles = {0}; trace_t tr; int anim, hold, soundIndex, cost; int damageLevel7 = FORCE_LEVEL_0; qboolean suck = qtrue; if ( self->health <= 0 ) // NON la castano i morti { return; } if ( self->client->ps.leanofs ) // NON si casta in leaf {//can't force-throw while leaning return; } if ( self->client->ps.forcePowerDebounce[FP_DARKGLYPH] > level.time ) // Non puoi castarla se c'è già un'onda d'urto nella stanza. {//already pushing- now you can't haul someone across the room, sorry return; } // X VUOTO if ( self->client->ps.pullAttackTime > level.time ) // Non puoi castarla se stai usando il force pull {//already pushing- now you can't haul someone across the room, sorry return; } // NOn puoi castarla nelle cutscene if ( !self->s.number && (cg.zoomMode || in_camera) ) {//can't force throw/pull when zoomed in or in cinematic return; }// Non puoi castarla mentre pari un colpo di spada. non sei concentrato. if ( self->client->ps.saberLockTime > level.time ) { if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] < FORCE_LEVEL_3 ) {//this can be a way to break out return; } // A LIVELLO 3 PERO' SI! //else, I'm breaking my half of the saberlock self->client->ps.saberLockTime = 0; self->client->ps.saberLockEnemy = ENTITYNUM_NONE; } // SE I PERSONAGGI SI STANNO RIALZANDO, L'ONDA NON FUNZIONA ANCORA SU DI LORO. POSSON ESSER SPINTI, NON ALTRO. if ( self->client->ps.legsAnim == BOTH_KNOCKDOWN3 || (self->client->ps.torsoAnim == BOTH_FORCE_GETUP_F1 && self->client->ps.torsoAnimTimer > 400) || (self->client->ps.torsoAnim == BOTH_FORCE_GETUP_F2 && self->client->ps.torsoAnimTimer > 900) || (self->client->ps.torsoAnim == BOTH_GETUP3 && self->client->ps.torsoAnimTimer > 500) || (self->client->ps.torsoAnim == BOTH_GETUP4 && self->client->ps.torsoAnimTimer > 300) || (self->client->ps.torsoAnim == BOTH_GETUP5 && self->client->ps.torsoAnimTimer > 500) ) {//we're face-down, so we'd only be force-push/pulling the floor return; } radius = darkglyphRadius[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; if ( !radius ) {//no ability to do this yet return; } if ( chargeTime7 > 10000.0f ) { damageLevel7 = FORCE_LEVEL_3; } else if ( chargeTime7 > 8000.0f ) { damageLevel7 = FORCE_LEVEL_2; } else if ( chargeTime7 > 5000.0f ) { damageLevel7 = FORCE_LEVEL_1; } // COSTO MANA. cost = forcePowerNeeded[FP_DARKGLYPH]; if ( !WP_ForcePowerUsable( self, FP_DARKGLYPH, cost ) ) { return; } // EFFETTO, ANIMAZIONE E CASTING. // LIV 1 MIETITRICE DI TENEBRE if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_1 ) { anim = BOTH_SPINATTACK7; //BOTH_FORCE_2HANDEDLIGHTNING_HOLD; hold = 700; G_PlayEffect( G_EffectIndex( "reavers/darkimpact2" ), self->client->renderInfo.handRPoint ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/Dark_Reaver/Darkreaver_Shield2.mp3" ); int parts = SETANIM_TORSO; if ( !PM_InKnockDown( &self->client->ps ) ) { if ( self->client->ps.saberLockTime > level.time ) { self->client->ps.saberLockTime = 0; self->painDebounceTime = level.time + 2000; hold += 2000; parts = SETANIM_BOTH; } } NPC_SetAnim( self, parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART ); self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have een in self->client->ps.saberBlocked = BLOCKED_NONE; // AGGIUSTAMENTO TEMPO PER LO SPEED if ( self->client->ps.forcePowersActive&(1<<FP_SPEED) ) { hold = floor( hold*g_timescale->value ); } // TEMPO DI CASTING self->client->ps.weaponTime = hold;//was 1000, but want to swing sooner //do effect... FIXME: build-up or delay this until in proper part of anim // self->client->ps.powerups[PW_FORCE_REPULSE] = level.time + self->client->ps.torsoAnimTimer + 500; //reset to 0 in case it's still > 0 from a previous push // self->client->pushEffectFadeTime = 0; VectorCopy( self->client->ps.viewangles, fwdangles ); fwdangles[1] = self->client->ps.viewangles[1]; AngleVectors( fwdangles, forward, right, NULL ); VectorCopy( self->currentOrigin, center ); } // LIV 2 MIETITRICE DI FUMO else if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_2 ) { // SMOKE REAVER anim = BOTH_SPINATTACK6; //BOTH_FORCE_2HANDEDLIGHTNING_HOLD; hold = 1000; G_PlayEffect( G_EffectIndex( "reavers/smogimpact2" ), self->client->renderInfo.handRPoint ); // G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/Smog_Reaver/smogreaver_Shield.mp3" ); int parts = SETANIM_TORSO; if ( !PM_InKnockDown( &self->client->ps ) ) { if ( self->client->ps.saberLockTime > level.time ) { self->client->ps.saberLockTime = 0; self->painDebounceTime = level.time + 2000; hold += 2000; parts = SETANIM_BOTH; } } NPC_SetAnim( self, parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART ); self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have een in self->client->ps.saberBlocked = BLOCKED_NONE; // AGGIUSTAMENTO TEMPO PER LO SPEED if ( self->client->ps.forcePowersActive&(1<<FP_SPEED) ) { hold = floor( hold*g_timescale->value ); } // TEMPO DI CASTING self->client->ps.weaponTime = hold;//was 1000, but want to swing sooner //do effect... FIXME: build-up or delay this until in proper part of anim // self->client->ps.powerups[PW_FORCE_REPULSE] = level.time + self->client->ps.torsoAnimTimer + 500; //reset to 0 in case it's still > 0 from a previous push // self->client->pushEffectFadeTime = 0; VectorCopy( self->client->ps.viewangles, fwdangles ); fwdangles[1] = self->client->ps.viewangles[1]; AngleVectors( fwdangles, forward, right, NULL ); VectorCopy( self->currentOrigin, center ); } // LIV 3 MIETITRICE DI VUOTO else if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_3 ) { // NATURE REAVER if ( self->client->NPC_class == CLASS_KYLE || self->client->NPC_class == CLASS_REBORN || self->client->NPC_class == CLASS_MONMOTHA || self->client->NPC_class == CLASS_ALORA || self->client->NPC_class == CLASS_TUSKEN || self->client->NPC_class == CLASS_GLIDER || self->client->NPC_class == CLASS_NOGHRI || self->client->NPC_class == CLASS_SWAMPTROOPER || self->client->NPC_class == CLASS_GRAN ) // In case of Kain, use the Nature Reaver ATK. { anim = BOTH_VICTORY_STRONG;//LS_DUAL_SPIN_PROTECT; //BOTH_FORCE_2HANDEDLIGHTNING_HOLD; hold = 1000; G_PlayEffect( G_EffectIndex( "vampire/natureimpact2.efx" ), self->client->renderInfo.handRPoint ); int parts = SETANIM_TORSO; if ( !PM_InKnockDown( &self->client->ps ) ) { if ( self->client->ps.saberLockTime > level.time ) { self->client->ps.saberLockTime = 0; self->painDebounceTime = level.time + 2000; hold += 2000; parts = SETANIM_BOTH; } } NPC_SetAnim( self, parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART ); self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have een in self->client->ps.saberBlocked = BLOCKED_NONE; // AGGIUSTAMENTO TEMPO PER LO SPEED if ( self->client->ps.forcePowersActive&(1<<FP_SPEED) ) { hold = floor( hold*g_timescale->value ); } // TEMPO DI CASTING self->client->ps.weaponTime = hold;//was 1000, but want to swing sooner //do effect... FIXME: build-up or delay this until in proper part of anim self->client->ps.powerups[PW_FORCE_REPULSE] = level.time + self->client->ps.torsoAnimTimer + 500; //reset to 0 in case it's still > 0 from a previous push self->client->pushEffectFadeTime = 0; VectorCopy( self->client->ps.viewangles, fwdangles ); fwdangles[1] = self->client->ps.viewangles[1]; AngleVectors( fwdangles, forward, right, NULL ); VectorCopy( self->currentOrigin, center ); } else { anim = BOTH_SPINATTACK7; //BOTH_FORCE_2HANDEDLIGHTNING_HOLD; hold = 1200; G_PlayEffect( G_EffectIndex( "reavers/vacuumimpact2" ), self->client->renderInfo.handRPoint ); // G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/Void_Reaver/Vacuumreaver_Shield.mp3" ); int parts = SETANIM_TORSO; if ( !PM_InKnockDown( &self->client->ps ) ) { if ( self->client->ps.saberLockTime > level.time ) { self->client->ps.saberLockTime = 0; self->painDebounceTime = level.time + 2000; hold += 2000; parts = SETANIM_BOTH; } } NPC_SetAnim( self, parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART ); self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have een in self->client->ps.saberBlocked = BLOCKED_NONE; // AGGIUSTAMENTO TEMPO PER LO SPEED self->client->pushEffectFadeTime = 0; if ( self->client->ps.forcePowersActive&(1<<FP_SPEED) ) { hold = floor( hold*g_timescale->value ); } // TEMPO DI CASTING self->client->ps.weaponTime = hold;//was 1000, but want to swing sooner //do effect... FIXME: build-up or delay this until in proper part of anim // self->client->ps.powerups[PW_FORCE_REPULSE] = level.time + self->client->ps.torsoAnimTimer + 500; //reset to 0 in case it's still > 0 from a previous push // self->client->pushEffectFadeTime = 0; VectorCopy( self->client->ps.viewangles, fwdangles ); fwdangles[1] = self->client->ps.viewangles[1]; AngleVectors( fwdangles, forward, right, NULL ); VectorCopy( self->currentOrigin, center ); } } //make sure this plays and that you cannot press fire for about 1 second after this // FISICITA' E COLLIDERS if ( !numListedEntities ) { for ( i = 0 ; i < 3 ; i++ ) { mins[i] = center[i] - radius; maxs[i] = center[i] + radius; } numListedEntities = gi.EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES ); // IMPORTANTE EFX AOE DI SPINTA for ( e = 0 ; e < numListedEntities ; e++ ) { ent = entityList[ e ]; if ( !WP_ForceThrowable( ent, forwardEnt, self, qfalse, 0.0f, radius, forward ) ) { continue; } //this is all to see if we need to start a saber attack, if it's in flight, this doesn't matter // find the distance from the edge of the bounding box for ( i = 0 ; i < 3 ; i++ ) { if ( center[i] < ent->absmin[i] ) { v[i] = ent->absmin[i] - center[i]; } else if ( center[i] > ent->absmax[i] ) { v[i] = center[i] - ent->absmax[i]; } else { v[i] = 0; } } VectorSubtract( ent->absmax, ent->absmin, size ); VectorMA( ent->absmin, 0.5, size, ent_org ); //see if they're in front of me VectorSubtract( ent_org, center, dir ); VectorNormalize( dir ); dist = VectorLength( v ); if ( dist >= radius ) { continue; } //in PVS? if ( !ent->bmodel && !gi.inPVS( ent_org, self->client->renderInfo.eyePoint ) ) {//must be in PVS continue; } if ( ent != forwardEnt ) {//don't need to trace against forwardEnt again //really should have a clear LOS to this thing... gi.trace( &tr, self->client->renderInfo.eyePoint, vec3_origin, vec3_origin, ent_org, self->s.number, MASK_FORCE_PUSH, (EG2_Collision)0, 0 );//was MASK_SHOT, but changed to match above trace and crosshair trace if ( tr.fraction < 1.0f && tr.entityNum != ent->s.number ) {//must have clear LOS continue; } } // ok, we are within the radius, add us to the incoming list push_list[ent_count] = ent; ent_count++; } } for ( int x = 0; x < ent_count; x++ ) { if ( push_list[x]->client ) { vec3_t pushDir; qboolean targetLive = qtrue; float knockback = suck?0:700; // 700 POTENZA DELL'URTO //SIGH band-aid... if ( push_list[x]->s.number >= MAX_CLIENTS && self->s.number < MAX_CLIENTS ) { // BLOCCA COLORO CHE STANNO USANDO TK E BLEEDING // EFFETTO SUGLI AVVERSARI! // LIVELLO 1, TENEBRA if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_1 && push_list[x]->s.weapon != WP_NONE //don't charm people who aren't capable of fighting... like ugnaughts and droids, just confuse them && !Pilot_AnyVehiclesRegistered()) {//FA EFFETTO SOLO SULLE SEGUENTI CLASSI // CLASSI SU CUI FA EFFETTO if ( push_list[x] && push_list[x]->client ) { switch ( push_list[x]->client->NPC_class ) { // BLINDED, And DAMAGED case CLASS_SABER_DROID: case CLASS_PROTOCOL: case CLASS_ASSASSIN_DROID: case CLASS_MORGANKATARN: // HEAVY DAMAGED // tutti gli elementali e i boss non posson esser stunnati! if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; if ( push_list[x]->ghoul2.size() && push_list[x]->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/blind" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_PlayEffect( G_EffectIndex( "reavers/darkimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.eyePoint, 10, DAMAGE_NO_KNOCKBACK, MOD_BRYAR ); } if ( PM_HasAnimation( push_list[x], BOTH_COWER1 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_COWER1, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_COWER1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer += 200; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; }; break; // just blinded, not damaged case CLASS_RODIAN: case CLASS_PRISONER: case CLASS_TRANDOSHAN: case CLASS_STORMTROOPER: case CLASS_IMPWORKER: case CLASS_IMPERIAL: case CLASS_REBORN: case CLASS_JEDI: case CLASS_ALORA: case CLASS_MONMOTHA: case CLASS_TUSKEN: case CLASS_WEEQUAY: case CLASS_SWAMPTROOPER: case CLASS_COMMANDO: case CLASS_TAVION: case CLASS_MINEMONSTER: case CLASS_WAMPA: case CLASS_SWAMP: case CLASS_INTERROGATOR: case CLASS_MARK1: case CLASS_MARK2: case CLASS_R2D2: case CLASS_R5D2: case CLASS_HAZARD_TROOPER: case CLASS_REBEL: case CLASS_ROCKETTROOPER: case CLASS_BARTENDER: case CLASS_GONK: case CLASS_UGNAUGHT: case CLASS_REELO: if ( push_list[x]->enemy ) { G_ClearEnemy( push_list[x] ); } //FIXME: maybe pick an enemy right here? //FIXME: does nothing to TEAM_FREE and TEAM_NEUTRALs!!! //FIXME: need a *charmed* timer on this...? Or do TEAM_PLAYERS assume that "confusion" means they should switch to team_enemy when done? push_list[x]->NPC->confusionTime = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; push_list[x]->flags ^= FL_NOTARGET; soundIndex = G_SoundIndex( va("sound/weapons/Dark_Reaver/darkreavershadows%d.wav", Q_irand( 1, 4 ) ) ); if ( push_list[x]->ghoul2.size() && push_list[x]->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "force/blind" ), push_list[x]->playerModel, push_list[x]->headBolt, push_list[x]->s.number, push_list[x]->currentOrigin, SunGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); } if ( PM_HasAnimation( push_list[x], BOTH_COWER1 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_COWER1, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_COWER1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer += 200; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; } break; // Damaged, but no Blinded! They are too smarts! case CLASS_JAN: case CLASS_GALAK: case CLASS_GLIDER: case CLASS_NOGHRI: case CLASS_MURJJ: case CLASS_LIZARD: case CLASS_FISH: case CLASS_CLAW: case CLASS_FLIER2: soundIndex = G_SoundIndex( va("sound/weapons/Dark_Reaver/darkreavershadows%d.wav", Q_irand( 1, 4 ) ) ); if ( push_list[x]->ghoul2.size() && push_list[x]->headBolt != -1 ) {//FIXME: what if already playing effect? G_PlayEffect( G_EffectIndex( "reavers/darkimpactbody2" ), push_list[x]->playerModel, push_list[x]->chestBolt, push_list[x]->s.number, push_list[x]->currentOrigin ); G_Damage( push_list[x], self, self, 0, push_list[x]->client->renderInfo.eyePoint, 10, DAMAGE_NO_KNOCKBACK, MOD_BRYAR ); } if ( PM_HasAnimation( push_list[x], BOTH_COWER1 ) ) { NPC_SetAnim( push_list[x], SETANIM_LEGS, BOTH_COWER1, SETANIM_FLAG_NORMAL ); NPC_SetAnim( push_list[x], SETANIM_TORSO, BOTH_COWER1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); push_list[x]->client->ps.torsoAnimTimer += 200; push_list[x]->client->ps.weaponTime = push_list[x]->client->ps.torsoAnimTimer; // anim = BOTH_SONICPAIN_HOLD; hold = level.time + DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]]; } break; default: break; } } } -
Multiple Mindtrick & NPC sound detection while blinded?
Asgarath83 replied to JediBantha's topic in Coding and Scripts
Not easily task. I did just some force powers into SP. but confusion time just is a time indicator for amount of second of stunning an enemy with mindtrick power. can be used also for other power that called mindtrick stunning function. not affecting in any mode the way of combat engaging of an enemy. stormtrooper simply it's like in BS_CINEMATIC state for this seconds. the confusion time is not a good way for this kind of power. maybe you not need to stun the enemy, but just to make "baddest" his aim. so, the force power need to affect the aim of npc, maybe decrease to 1 as value, and maybe reduce also visrange amount for a lot of second. and for this you need a custom "confusion time" specific to your power. about NPC sounds, this is more easily simply copy \ paste the mindtrick section related to G_clearenemy when power is used. NPC will did some confuse - find voice tracks. G_clearenemy not affected AI, but Npc with this function called speaks confuse1-2-3 tracks. thii cannot help you effectly because my code is for single player... i will paste the code of FP_DARKGLYPH power of my mod here however. the level 1 of the power generate a shockwave when all foes around player cannot detect him for few seconds. also player get cloaking when use the force power. maybe you can use, if you can fix this code for MP. this code join mindtrick code functions with force repulse code of JAE. level 1: cloud of darkness. enemy blinded. level 2: cloud of smoke, enemy chocked. level 3: cloud of void, enemy are chocked and sucked to the player with and inverse knockback. below mindtrick code: void DarkGlyph( gentity_t *self ) { // Morto non lo casta di certo if ( self->health <= 0 ) { return; } // In cinematic niente glifi! if ( !self->s.number && (cg.zoomMode || in_camera) ) {//can't repulse when zoomed in or in cinematic return; } // Niente glifi in leafing if ( self->client->ps.leanofs ) {//can't repulse while leaning return; } // Costo del potere if ( !WP_ForcePowerUsable( self, FP_DARKGLYPH, 99 ) ) { return; } if ( self->client->ps.weaponTime >= 800 ) {//just did one! return; } if ( self->client->ps.saberLockTime > level.time ) {//FIXME: can this be a way to break out? return; } // Non castarlo se è già attivo! if ( self->client->ps.repulseChargeStart ) { return; } // Non castabile in caso di parata. if ( self->client->ps.saberLockTime > level.time ) {//FIXME: can this be a way to break out? return; } // REPEL, CONTROMAGIA E REPEL ARCANO VENGON DISATTIVATI SE LO USI // Make sure to turn off Force Protection and Force Absorb. 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 ); } self->client->ps.repulseChargeStart = level.time; // ANIMAZIONE DI CASTING if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_1 ) { NPC_SetAnim( self, SETANIM_TORSO, BOTH_SPINATTACK7, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in self->client->ps.saberBlocked = BLOCKED_NONE; // SUONO DI LOOPING DURANTE IL CASTING. G_PlayEffect( G_EffectIndex( "reavers/shadow." ), self->playerModel, self->handRBolt, self->s.number, self->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_PlayEffect( G_EffectIndex( "reavers/shadow" ), self->playerModel, self->handLBolt, self->s.number, self->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/shadowclaw/draw.wav" ); //FIXME: build-up or delay this until in proper part of anim self->client->ps.weaponTime = self->client->ps.torsoAnimTimer; // CASTATO AL TERMINE DELL'ANIMAZIONE WP_ForcePowerStart( self, FP_DARKGLYPH, 1 ); } else if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_2 ) { NPC_SetAnim( self, SETANIM_TORSO, BOTH_SPINATTACK6, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in self->client->ps.saberBlocked = BLOCKED_NONE; // SUONO DI LOOPING DURANTE IL CASTING. G_PlayEffect( G_EffectIndex( "reavers/smog" ), self->playerModel, self->handRBolt, self->s.number, self->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_PlayEffect( G_EffectIndex( "reavers/smog" ), self->playerModel, self->handLBolt, self->s.number, self->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/Smog_Reaver/smogreaverstrong3.mp3" ); //FIXME: build-up or delay this until in proper part of anim self->client->ps.weaponTime = self->client->ps.torsoAnimTimer; // CASTATO AL TERMINE DELL'ANIMAZIONE WP_ForcePowerStart( self, FP_DARKGLYPH, 2 ); } else if ( self->client->ps.forcePowerLevel[FP_DARKGLYPH] == FORCE_LEVEL_3 ) { if ( self->client->NPC_class == CLASS_KYLE || self->client->NPC_class == CLASS_REBORN || self->client->NPC_class == CLASS_ALORA || self->client->NPC_class == CLASS_MONMOTHA || self->client->NPC_class == CLASS_TUSKEN || self->client->NPC_class == CLASS_GLIDER || self->client->NPC_class == CLASS_SWAMPTROOPER || self->client->NPC_class == CLASS_NOGHRI || self->client->NPC_class == CLASS_GRAN ) {// NATURE REAVER CHARGING NPC_SetAnim( self, SETANIM_TORSO, BOTH_VICTORY_STRONG, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in self->client->ps.saberBlocked = BLOCKED_NONE; // SUONO DI LOOPING DURANTE IL CASTING. // self->s.loopSound = G_SoundIndex( "sound/weapons/force/confusionloop.wav" ); G_PlayEffect( G_EffectIndex( "force/nature2" ), self->playerModel, self->handRBolt, self->s.number, self->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_PlayEffect( G_EffectIndex( "force/nature2" ), self->playerModel, self->handLBolt, self->s.number, self->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/Nature_Reaver/naturereaverstrong3.mp3" ); //FIXME: build-up or delay this until in proper part of anim self->client->ps.weaponTime = self->client->ps.torsoAnimTimer; // CASTATO AL TERMINE DELL'ANIMAZIONE WP_ForcePowerStart( self, FP_DARKGLYPH, 3 ); } else { NPC_SetAnim( self, SETANIM_TORSO, BOTH_SPINATTACK7, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in self->client->ps.saberBlocked = BLOCKED_NONE; // SUONO DI LOOPING DURANTE IL CASTING. G_PlayEffect( G_EffectIndex( "reavers/void" ), self->playerModel, self->handRBolt, self->s.number, self->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_PlayEffect( G_EffectIndex( "reavers/void" ), self->playerModel, self->handLBolt, self->s.number, self->currentOrigin, DarkGlyphTime[self->client->ps.forcePowerLevel[FP_DARKGLYPH]], qtrue ); G_SoundOnEnt( self, CHAN_ITEM, "sound/weapons/Vacuum_Reaver/vacuumreaverstrong3.mp3" ); //FIXME: build-up or delay this until in proper part of anim self->client->ps.weaponTime = self->client->ps.torsoAnimTimer; // CASTATO AL TERMINE DELL'ANIMAZIONE WP_ForcePowerStart( self, FP_DARKGLYPH, 3 ); } } } -
@@ensiform ... so the freeze loading should be caused also by some NPC player model, or by spawning same blade model attacked to Npcs, not only by custom ext_data scripts... awww, that sucks.
-
@@Dusty it's a bug of original jedi academy game related to .SAB files. if there is a map with more of certain entities that carry as weapon in NPC file confgiguration wp_saber and they get as weapon a saber with the parameters of melee weapons (bounceonwalls, noblade, nodlight, nowallmarks etc etc ) when level is loaded by ui menu can get the error "a reliable command was cycled out" or simply freeze the loading at the end with the load bar that crazy fade in \ off in the last segment. i tested on my experience if that occur if in the map are spawned more of 5 saberist npcs. or 4 saberist npcs + load a player that get a melee saber with g_saber \ui_saber command setting on menu. so is some kind of problem of buffer allocation for sab file into the loading system of JKA. this issue occours also on openjk SP client. many of my custom NPCs on mod get melee sabers and some maps fulls of reborns and saberist cannot load for this issue. (like vjun3, for example, is one of the more bugged loading ) i never discovered why it happen but it's an hold problem (and sorry for the disturb, i need maybe to open another thread about that? :S ) but for this problem i lost years of modding time because i passed many months to reconfig my NPCs \ SAB assets for try to avoid this issue. a level is unplayable with this problem. this not happen if NPCs get in NPC files configuration shooting weapons of every kind. or if the npc receive as weapon WP_SABER + a melee saber into a spawnscripts. tested that with t1_fatal map. stormtrooper that get with spawnscripts saber not overload the load \ savegame system of the level related to quick save or save game. this occurs only with the loading of a level by JKA menu. it's something related to the loading of saberist NPC by menu. i never knew or discover why this happen... or what bug of the engine cause that. for that, i am curious about all the functions called in the loading of a map. i wanna understand how is loaded a bsp level, and how are loaded the entities of JKA. sure the answers lies in that code part. if you want to test this troubles, you can download by the file section of this site a dozen of melee blades by some melee pack, and assign to NPCs of the games in a way that in a level are present more of 4-5 NPC with the custom mod melee sabers. (katana, climb, maces, swords, scythe etc ) edit with that cultist and reborn. npc files is sufficient. if you load maps like vjun3 or taspir1 you will get the bug i mean. tested now on taspir1 map. stormtrooopers and reborns of levels carry alls melee saber weapons of different kinds. the results is that: http://oi65.tinypic.com/2s8r37k.jpg
-
Question: is possible some code fix for the save game infinite loading bug screen that occur when a level get more of 4 different NPC with different custom new lightsabers carried as weapons? i ever get this bug every time there are some many sab file too large with melee weapons.
-
Mission: Coruscant (Capture the Crime lord)
Asgarath83 replied to Darth Sion's topic in Jedi Academy: Enhanced
Tjanks, today i will know something much by exams. now... please, return to the thread and good modding -
Mission: Coruscant (Capture the Crime lord)
Asgarath83 replied to Darth Sion's topic in Jedi Academy: Enhanced
@@Darth Sion, sorry, but i need to be a little more clear: i leaved the project for big heals troubles occured in the last months. i am fight with some big infections at moment. so really i cannot manage more this project. i did all what was possible i did with nav grid and some NPC placing. i am sorry but really i cannot help more, so please stop to notify myself for this project, because is not much honest. i have no merit in that because i cannot work to this project at moment. for script, cinematic and NPC parameter is all into your hand and Cerez hand. -
Sith Eyes on Jaden in Story/Campaign mode
Asgarath83 replied to Darth Sion's topic in Mod Requests & Suggestions
The bad problem is that jaden skin is not rigid: is done with a head_*, torso_*, lower_* combination, at second of choice of player on character menu. i not know how is possible to manage with this variable. for what i remember, set_skin command require the complete path of SKIN file that you want to load to the model. mmm Otherwise... i ask to myself if is possible to load simply a set_skin command that load a new head_sith_a1.SKIN, a2.SKIN etc, with an if \ else case related about if jaden get head_a1, head_b1 or head_c1 face. if this work is not necessary to fully update the body. can works maybe just with an update of head? i remember that jadens skins files are not completed with all body parts, they contains only the mesh and texture path istruction of head, torso and lower pants parts. so, head_a1 not get torso and lower info, torso not get head info... maybe this can make all stuff more simple. with only the head to change there are less variables to change. -
Sith Eyes on Jaden in Story/Campaign mode
Asgarath83 replied to Darth Sion's topic in Mod Requests & Suggestions
smart idea check the hoth skin for example. is loaded after an academy cutscene, and not a menu (i know how to change playermodels basically with menus) if i remember fine, it loaded two files of jaden body folder: torso_g1.SKIN and lower_e1.SKIN not idea of how exactly work. otherwise, this work for all jaden races. sith eyes are just for humans male and female (okay also for twi'lek and zabrak i guess) so is more complicated. the change affected only some species and is a facial change, not a standard body reskin common for all species of game (also aliens skins of jaden get hoth skin) but yes, can get some suggest. mmm ehi, a good idea maybe should be also to check how work tavion possessed by marka ragnos? effectoley, she change player model and eyes color after a cutscene, remember? when ragnos ghost enter into her in korriban light side final fight. -
Sith Eyes on Jaden in Story/Campaign mode
Asgarath83 replied to Darth Sion's topic in Mod Requests & Suggestions
there is also the problem that the changing of skin and playermodel info need to affected g_char of character for become definitive, if not, i doubt it load kor1_dark with sith skin... pity there is not a menu transistion between taspir2 and kor1 levels, that can make the changing more easy. i tryied in past with original JKA client, not openjk to use SET_SKIN for changing skin of human mercs on t1_sour level. i maked two custom red and blue skin for mercs, and that works: mercs npc was spawned one with blue and other with red dresses, i edited an icarus ibi dialogue. so is possible to change skin with icarus script. i not know if this work for if \ else variables. never tried. i noticed however in original JKA change too many skins can cause load crash of save games of a level. not know why. however now i cannot check this complicated thing. is a bad period and i pass through an hellish hospital esperience for an infection. really i am not in condition of modding, now. -
Sith Eyes on Jaden in Story/Campaign mode
Asgarath83 replied to Darth Sion's topic in Mod Requests & Suggestions
there is also the problem that the changing of skin and playermodel info need to affected g_char of character for become definitive, if not, i doubt it load kor1_dark with sith skin... pity there is not a menu transistion between taspir2 and kor1 levels, that can make the changing more easy. i tryied in past with original JKA client, not openjk to use SET_SKIN for changing skin of human mercs on t1_sour level. i maked two custom red and blue skin for mercs, and that works: mercs npc was spawned one with blue and other with red dresses, i edited an icarus ibi dialogue. so is possible to change skin with icarus script. i not know if this work for if \ else variables. never tried. i noticed however in original JKA change too many skins can cause load crash of save games of a level. not know why. however now i cannot check this complicated thing. is a bad period and i pass through an hellish hospital esperience for an infection. really i am not in condition of modding, now. -
Sith Eyes on Jaden in Story/Campaign mode
Asgarath83 replied to Darth Sion's topic in Mod Requests & Suggestions
@@Darth Sion the code shoul be simply an ibi script edit of rosh death choice cutscene... Should... XD because jaden have custom appereance for human body, so i really not know how to implement that in Icarus. mmmm maybe the unique way should be "If SET_SKIN "jaden skin 1" -> SET_SKIN jaden skin1 sith else if SET_SKIN "jaden skin 2£ -> SET_SKIN jaden skin 2 etc. However i am not so in approvation for this mod. the sith yellow eyes depend about how many someone fall into the dark side. that can works for anakin, but for jaden... really, is a little silly jaden in sith mode. for JKA plot is not truely a dark side. is just... crazy for anger. it's not a soul corruption 100% so, i not see the purpose of yellow eyes. however, if you really like the mod and you want this thing, you need: - a set of faces with sith eyes . - a set of new .skin files for jaden human male and female model with sith eyes. these two sets are new files, they NOT replace the old skin files or jaden face. - a edited rosh death cutscene on taspir2 that replace the jaden's skin with related sith skins. but the problem is that jaden appereance are customs, so the script not works fine with others jaden. only an if \ else switch can works for that... and i am not sure of how build a similiar thing into SP code, really i not know how to make it. so i need to decline that. Also, actually i am pretty sick and i leave modding for take an hand of my heal. (just if someone not again understand, i am not more a modder in this time)