ensiform Posted December 14, 2007 Share Posted December 14, 2007 TBH, I think it would look better to use the SP shell around player when you get hurt with shield. Half bubble looks kind of out of place in OJP. Link to comment Share on other sites More sharing options...
Alec{zacool} Posted December 14, 2007 Share Posted December 14, 2007 Hmm, good idea, but I don't think it's possible with the engine? Is it? I don't really know. But I don't really like the shield, so yeah. Link to comment Share on other sites More sharing options...
madcatmach2 Posted December 14, 2007 Share Posted December 14, 2007 sure it is its just a different effect, me personally i hate the look and idea of the shield so i got rid of it all together huge improvement in my opinion. Link to comment Share on other sites More sharing options...
JRHockney* Posted December 15, 2007 Share Posted December 15, 2007 sure it is its just a different effect, me personally i hate the look and idea of the shield so i got rid of it all together huge improvement in my opinion. Me too! Link to comment Share on other sites More sharing options...
ensiform Posted December 15, 2007 Author Share Posted December 15, 2007 You got rid of shields period or just the effect? AFAIK its doable, I can check in the parts of the sp code that we still have for doing some of CoOp. Seems to be gfx/misc/personalshield. This is how they do it in SP, but you'd need to change it to work like the MP way and apply this shader around the player: // Personal Shields //------------------------ if ( powerups & ( 1 << PW_BATTLESUIT )) { float diff = gent->client->ps.powerups[PW_BATTLESUIT] - cg.time; float t; if ( diff > 0 ) { t = 1.0f - ( diff / (ARMOR_EFFECT_TIME * 2.0f)); // Only display when we have damage if ( t < 0.0f || t > 1.0f ) { } else { ent->shaderRGBA[0] = ent->shaderRGBA[1] = ent->shaderRGBA[2] = 255.0f * t; ent->shaderRGBA[3] = 255; ent->renderfx &= ~RF_ALPHA_FADE; ent->renderfx |= RF_RGB_TINT; ent->customShader = cgs.media.personalShieldShader; cgi_R_AddRefEntityToScene( ent ); } } } So, it *should* be doable and it seems to work pretty much just like the force powers around the player. Link to comment Share on other sites More sharing options...
madcatmach2 Posted December 15, 2007 Share Posted December 15, 2007 i just got rid of the effect Link to comment Share on other sites More sharing options...
Rtemis Posted December 16, 2007 Share Posted December 16, 2007 yes just get rid of the effect from gfx Link to comment Share on other sites More sharing options...
madcatmach2 Posted December 16, 2007 Share Posted December 16, 2007 that will give you errors. so i just made an effect that was nothing and replaced it with that Link to comment Share on other sites More sharing options...
ensiform Posted December 17, 2007 Author Share Posted December 17, 2007 To make the SP shield work: comment out CG_PlayerHitFX in CG_Player. Between CG_PlayerPowerups call and the force drain section of CG_Player, add: //[TrueView] if (cent->damageTime > cg.time && cent->currentState.NPC_class != CLASS_VEHICLE && (cg.renderingThirdPerson || cent->currentState.number != cg.snap->ps.clientNum || cg_trueguns.integer || cg.predictedPlayerState.weapon == WP_SABER || cg.predictedPlayerState.weapon == WP_MELEE)) //[/TrueView] { int alpha = 255.0 * ((cent->damageTime - cg.time) / MIN_SHIELD_TIME) + random()*16; if (alpha>255) alpha=255; legs.shaderRGBA[0] = legs.shaderRGBA[1] = legs.shaderRGBA[2] = alpha; legs.shaderRGBA[3] = 255; legs.renderfx &= ~RF_FORCE_ENT_ALPHA; legs.renderfx &= ~RF_MINLIGHT; legs.renderfx &= ~RF_RGB_TINT; legs.customShader = cgs.media.playerShieldDamage; trap_R_AddRefEntityToScene( &legs ); } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.