Project X Forums



It is currently Thu May 13, 2021 2:44 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Revised Hang-Glider and Swim Suit
PostPosted: Fri Mar 07, 2014 3:01 pm 
Offline

Joined: Fri Jun 07, 2013 5:33 am
Posts: 4
Fixed Hang-Glider and Swim Suit libraries.
Both of them are fully compatible with Invisibility now. And fixed old landing animation bug in Hang-Glider.


Note: In order to get these libs working, you had to uncheck the old s_swimsuit.pxl, swim_suit_tweak.pxl (it's merged into s_swimsuit_revised), and wp_hangglider.pxl from your scheme.

UPDATED (25/3/14):
  • Fixed Hang-Glider transparency issue with invisibility.
  • Fixed Hang-Glider landing animation.


Attachments:
File comment: Revised Hang-Glider
wp_hangglider_revised.zip [31.62 KiB]
Downloaded 256 times
File comment: Revised Swim Suit
s_swimsuit_revised.zip [15.83 KiB]
Downloaded 262 times


Last edited by Pablo on Mon Apr 21, 2014 4:18 pm, edited 11 times in total.
Top
 Profile  
Reply with quote  
 Post subject: Re: Revised Hang-Glider and Swim Suit
PostPosted: Fri Mar 07, 2014 4:24 pm 
Offline

Joined: Mon Jul 30, 2012 9:45 am
Posts: 194
Great!

Perhaps you could give us a clue on what you did, or how you check for Invisibility being true or false? That way it would be possible to apply to other weapons (I'm thinking of Helicopter, ...)

Thanks for your work!

_________________
http://twitch.tv/wormsdotam | http://worms.am/hl | http://worms.am/zombieshopper | http://worms.am/golf | http://worms.am/holywar


Top
 Profile  
Reply with quote  
 Post subject: Re: Revised Hang-Glider and Swim Suit
PostPosted: Fri Mar 07, 2014 9:05 pm 
Offline

Joined: Fri Jun 07, 2013 5:33 am
Posts: 4
-raffie- wrote:
...how you check for Invisibility being true or false? That way it would be possible to apply to other weapons (I'm thinking of Helicopter, ...)

Well you really don't need invisibility checking, just put your drawing routines in the RenderWorm() event. It won't be called on remote machines when a worm is invisible.

The only problem(if you use custom graphics) are the semi-transparent sprites. Here you need invisibility checking, to determine if your sprites must be semi transparent.

Here is an example of how to do that(taken from my revised glider):
Code:
override void CDDQueue::AddSprite(fixed z,fixed x,fixed y,int unk,int sprite,fixed frame) {

if(GS->Tick < 1) {super;  return;}

CWorm *w = GetCurrentWorm();
if(w != NullObj && w->Glider->Deployed)
{

 // Replace normal Parachute sprites with Glider sprites
 if(sprite >= 287 && sprite <= 288) {
 w->AddSpriteEx(z, x, y, wormGliderSprite->Index, w->Glider->GliderAnimCycle, -w->Glider->GliderAng, 1);
 return;
 }

 // Replace mirrored Parachute sprites with mirrored Glider sprites
 if(sprite >= 287+262144 && sprite <= 288+262144) {
 w->AddSpriteEx(z, x, y, wormGliderSprite->Index+262144, w->Glider->GliderAnimCycle, w->Glider->GliderAng, 1);
 return;
 }

 // Replace semitransparent(invisibilized) Parachute sprites with semitransparent Glider sprites     
 if(sprite >= 287+2097152 && sprite <= 288+2097152) {
 w->AddSpriteEx(z, x, y, wormGliderSprite->Index+2097152, w->Glider->GliderAnimCycle, -w->Glider->GliderAng, 1);
 return;
 }

 // Replace transparent and mirrored Parachute sprites with transparent mirrored Glider sprites
 if(sprite >= 287+262144+2097152 && sprite <= 288+262144+2097152) {
 w->AddSpriteEx(z, x, y, wormGliderSprite->Index+262144+2097152, w->Glider->GliderAnimCycle, w->Glider->GliderAng, 1);
 return;
 }
}

super;
}



Edit: Updated Hang-Glider!.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Skin by Lucas Kane