[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - self.th_jump; [ Oh , this is a hack ! ]

self.th_jump; [ Oh , this is a hack ! ]

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

self.th_jump; [ Oh , this is a hack ! ]

Postby Cobalt » Sat Feb 22, 2014 5:37 pm

Last edited by Cobalt on Mon Mar 03, 2014 4:30 am, edited 7 times in total.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: self.th_jump; [ Oh , this is a hack ! ]

Postby qbism » Sat Feb 22, 2014 10:55 pm

Looks rather good actually.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: self.th_jump; [ Oh , this is a hack ! ]

Postby gnounc » Sun Feb 23, 2014 2:55 am

I like it! I think im going to throw it in my current project : )
my
gnounc's
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Re: self.th_jump; [ Oh , this is a hack ! ]

Postby Seven » Sun Feb 23, 2014 8:20 am

Very nice Cobalt.
Sometimes it only needs small tweaks to get great result.
Things like these should also go into the tutorials section of main page.
http://inside3d.com/tutorials.php
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: self.th_jump; [ Oh , this is a hack ! ]

Postby Cobalt » Sun Feb 23, 2014 4:13 pm

Thanks, glad u guys like it.

Noticed today the youtube vid got flagged for 3rd party content. The music track is from an old David Bowie Album....they got the artist and title correct, however, I wrote back to them saying its great you know that, but it should not matter unless you are an authorized agent of that artist to take any actions on his behalf. I have seen this topic bought up over and over, and if a complaint gets filed with anyone with a youtube account, its as if the actual artist is filing the complaint...which is a crock. I also mentioned the Quake team at ID software, and said credit ought to be given to them as well, and I have no problem mentioning all the people involved who wrote the software or supplied music etc. Actually , I think crediting everyone involved makes sense because you are acknowledging their work, and they can only benefit when they see something they did a long time ago still being promoted in a good light. True the decision is ultimately theirs and if they dont like your use of their work, they can request it not be posted, and you should take it down....but thats not for some dweeb at Google to decide - its up to the original artists to make that call.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: self.th_jump; [ Oh , this is a hack ! ]

Postby leileilol » Sun Feb 23, 2014 10:22 pm

Original artists were always screwed by the record industry executives, new and old songs alike - they can't make that call, even for those that did want to share their music to the world with the freedom of expression. The only music i've used in my videos were tracker music from the scene and I never had a problem with that.


Also, why go back to the stand1 animation after the jump? No one should do a standing pose when they fall. Even Quake2 knows that.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: self.th_jump; [ Oh , this is a hack ! ]

Postby Cobalt » Mon Feb 24, 2014 2:40 am

User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: self.th_jump; [ Oh , this is a hack ! ]

Postby frag.machine » Mon Feb 24, 2014 12:12 pm

@Cobalt: just use player_run instead, if the player has no velocity applied it will switch automatically to the stand animation, otherwise it won't look like is sliding on ice.

But I agree,making a jump animation that looks correctly in Quake is far more complex than one can imagine at first.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: self.th_jump; [ Oh , this is a hack ! ]

Postby Cobalt » Mon Feb 24, 2014 7:38 pm

Ok Frag machine....I edited the code above to reflect your improvement.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: self.th_jump; [ Oh , this is a hack ! ]

Postby Cobalt » Tue Feb 25, 2014 9:03 pm

Added another (2) updates.

1) Noticed this new sequence looks pretty good if its ran while the players FL_WATERJUMP is active from CheckWaterJump ().

2) Seems to be ok to also adjust the players hitbox / max_z size when we are frame 66 in the new jump sequence.... so lets put it out there and try it. The only thing I noticed where this could be trouble is if a solid entity happens to land on our head or already be on our head while we are jumping and are frame 66. Darkplaces didnt seem to mind much, but other engines I am not so sure.

UPDATE:

I noticed if you try these 2 changes, an issue will happen if you are in first person view during a waterjump and the hitbox is being altered. On a map like end for example, the wall you are against while jumping will disappear and if you float to the bottom while still touching the wall, you can see the rest of the map as if you are noclip. So I adjusted the max_x size of the hitbox one quake unit smaller than normal in addition to the _z change, and it seems to have resolved this anomaly. See updated code.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: self.th_jump; [ Oh , this is a hack ! ]

Postby Zop » Tue Jun 24, 2014 2:37 am

I noticed that you tried to use SUB_Null in the animation, so I think you should know what [] really does...

void () player_jump2 = [ 87, player_jump3 ] {};
void () player_jump3 = [ 66, player_jump4 ] {};

is the same as:

void () player_jump2 =
{
self.frame = 87;
self.think = player_jump3;
self.nextthink = time + 0.1;
};

void () player_jump3 =
{
self.frame = 66;
self.think = player_jump4;
self.nextthink = time + 0.1;
};

A result of this is that players' .think fields are always being updated for animation, so don't use them.

If you want to pause the animation, I think you can add a "self.nextthink = time + 0.2" (for two frames worth) in the function to override the []'s automatic one. In your case, I think you might need a think function that calls itself until the player touches ground.
Zop
 
Posts: 5
Joined: Mon Apr 21, 2014 10:41 pm

Re: self.th_jump; [ Oh , this is a hack ! ]

Postby Cobalt » Fri Jun 27, 2014 4:24 am

Zop thanks for that tip. I went ahead and put your code in as a test with all the same frames. Had to paste them in reverse because they call on each other from the bottom up, as opposed to the other code which works the other way.

Not any noticable difference so far....the animation looks the same , and if we start an atttack during that sequence, we jump out of it and go into the attack frames just like before, so I guess that would work too.

I have also updated this code alot since my last post, I have a landing sequence when the jump is at a decent height, also Im using frame No. 73 as a "diving" frame when jumpuig off a ledge, but not when the ledge is nearby a decent depth of water. For the case where the ledge is right near the water, I made the jump sequence activate, but with no upward velocity_z , so it makes him look like he didnt just fall into empty air. You may have seen it in action too when you played on my server last week.

I will try to post all the code here when time permits, but its more complicated because we are hijacking playerprethink () now, and new floats need to be added along with some others....
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest