Jump to content

Home

MBII saber blades


Recommended Posts

Not right now I don't, except for apparently these ones sort of work judging from what UDM said. They just break the ledge stuff, as well as RGB sabers still and probably other client-side Enhanced stuff.

 

I've been having trouble updating my Enhanced source code lately.

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 94
  • Created
  • Last Reply

Anyhow, I have located the issue pertaining to the black, white, and RGB Sabers.

 

In cgame/cgplayers.c, CG_DoSaber:

 

switch( color )
{
	case SABER_RED:
		glow = cgs.media.redSaberGlowShader;
		break;
	case SABER_ORANGE:
		glow = cgs.media.orangeSaberGlowShader;
		break;
	case SABER_YELLOW:
		glow = cgs.media.yellowSaberGlowShader;
		break;
	case SABER_GREEN:
		glow = cgs.media.greenSaberGlowShader;
		break;
	case SABER_PURPLE:
		glow = cgs.media.purpleSaberGlowShader;
		break;
	default:
		glow = cgs.media.blueSaberGlowShader;
		break;
}

 

and in CG_AddSaberBlade:

 

switch( scolor )
	{
		case SABER_RED:
			VectorSet( rgb1, 255.0f, 0.0f, 0.0f );
			break;
		case SABER_ORANGE:
			VectorSet( rgb1, 253.0f, 125.0f, 80.0f );
			break;
		case SABER_YELLOW:
			VectorSet( rgb1, 250.0f, 250.0f, 160.0f );
			break;
		case SABER_GREEN:
			VectorSet( rgb1, 100.0f, 240.0f, 100.0f );
			break;
		case SABER_PURPLE:
			VectorSet( rgb1, 196.0f, 0.0f, 196.0f );
			break;
		default:
			VectorSet( rgb1, 0.0f, 0.0f, 255.0f );
			break;
	}

 

The issue is that there is no case providing for the extra sabers. Add these and you're one step closer to making it work... except for readding all the other RGBSabers code you axed.

Link to comment
Share on other sites

I edited the SFX code changes in such a way that I believe that RGB Sabers will function properly with them... I'll post the txt file in a minute or so, though I likely made an amateur mistake somewhere.

 

I'd compile it myself and check, but Im not sure how to compile into an appropriate DLL.

Link to comment
Share on other sites

So, you edited the OJP files to make them work with the SFX sabers? I didn't know you could code. :)

 

Also, if everyone would like this in OJP, I'm going to need a better description of the changes so I can add them in. the easiest way would be to just send me the files with the changes applied to the OJP code.

Link to comment
Share on other sites

To be more accurate, I compared the latest cgame/cg_players.c file in Basic against the changes the SFX Sabers need you to make.

 

I do technically know some C, but to claim I can code would be something of a lie.

 

It's a very good thing we replaced the black blade of the black saber, or this code would NEVER work on black sabers as far as I can tell.

 

On that note, I replaced the text file above with a better one with a single critical error fixed.

Link to comment
Share on other sites

I had to declare "int cnum = cg.clientNum" and replaced "bnum" with just 0 (zero).

Varaible "i" from "for (i=0;i<3;i++)" needed declaration as an int and sbak needed declaration as a refEntity_t.

 

Then it compiled. Screenshots coming momentarily.

 

OK here:

 

http://www.taddia.com/vruki/saberbladepics/rgb_test_1.jpg

http://www.taddia.com/vruki/saberbladepics/rgb_test_2.jpg

http://www.taddia.com/vruki/saberbladepics/rgb_test_3.jpg

http://www.taddia.com/vruki/saberbladepics/rgb_test_4.jpg

http://www.taddia.com/vruki/saberbladepics/rgb_test_5.jpg

http://www.taddia.com/vruki/saberbladepics/rgb_test_6.jpg

http://www.taddia.com/vruki/saberbladepics/rgb_test_compare1.jpg

http://www.taddia.com/vruki/saberbladepics/rgb_test_compare2.jpg

 

The RGB look different from the last two pics, which are non-RGB for reference, because I have custom cores for regular sabers but didn't put those in for RGB cause I haven't usually used them.

 

Thanks for making this work Lath. Here's the dll I got:

 

http://www.taddia.com/vruki/cgamex86.dll

 

But I have to warn you it might have other changes since it's part of a work in progress and I can't remember atm what I've done to it in the past and kept. I think spawn shells and shields don't show up but I don't remember what else. If it matters to you let me know and I'll see what I can do to get it into an otherwise OJP basic cgamex86.dll.

Link to comment
Share on other sites

...That's odd, I declared sbak and variable i:

 

int i;
qhandle_t	glow = 0;
refEntity_t saber, sbak;

 

EDIT: Oh lord I'm a dope. I forgot to edit the function call. Bah. I'll be shocked if it still works, but...

 

Bnum is the blade the game is supposed to draw. Since you're setting it to 0 I doubt you get a blade now.

Link to comment
Share on other sites

Bnum is the blade the game is supposed to draw. Since you're setting it to 0 I doubt you get a blade now.

 

Of course I've got a blade! See for yourself. Bnum wasn't referred to in that function anymore, just "0", and that's worked fine before. Now though you're right there is a problem and it's that when using RGB with duals the second saber takes the color of the first instead of it's own. Black, white and pimp work OK just pure RGB doesn't. I'll go fix it.

Link to comment
Share on other sites

Oops! I forgot animtable.h was in cgame. Yeah it's all wacky. I've been working on putting a new style in today (BOTH_A8_ etc). That must look funny.

 

WAIT A MINUTE!! I think you just led me to the bug that was making my thing not work! I just saw where I didn't properly finish editing animtable.h. I'm going to go test that. Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...