[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 - Player death logic

Player death logic

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Player death logic

Postby Subject9x » Tue Sep 13, 2016 11:21 pm

Subject9x
 
Posts: 7
Joined: Thu Feb 10, 2011 4:12 am

Re: Player death logic

Postby frag.machine » Wed Sep 14, 2016 11:14 am

I'd suggest to treat the mech torso as the player model/main entity to keep compatibility with the original death functions. You haven't mentioned but losing parts during combat suggests some sort of locational damage. Remember that MOVETYPE_FOLLOW assumes all attached entities use SOLID_NOT. With my experiments in multipart players I had the best results this way.
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: Player death logic

Postby Subject9x » Wed Sep 14, 2016 10:11 pm

Thanks! I'll give that a try tomorrow :)
I was thinking over it today, if the player is the center torso, I myself am not sure how to keep the player on the ground to move normally except for:
Making the player hitbox encompass most of the mech's volume, filtering out the player when a project hits and finding the closest available body part? Maybe set the player to fly a certain number of units above the ground?
Subject9x
 
Posts: 7
Joined: Thu Feb 10, 2011 4:12 am

Re: Player death logic

Postby frag.machine » Thu Sep 15, 2016 11:53 am

In this case there's no elegant way to deal with locational damage unfortunately; you will have to make some calculations to find the approximated impact area and react according. You may simplify a bit things working only in relation to the z axis and thus defining 3 zones: head, body or legs. The idea of a "hovering" entity sounds complicated and prone to many problems like getting stuck in stairs or jumping.
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: Player death logic

Postby Subject9x » Fri Sep 16, 2016 12:06 am

so should the player bbox encompass 'most' of the expected mech's volume? and the player model; the 'center torso' would be drawn at an offset?
Subject9x
 
Posts: 7
Joined: Thu Feb 10, 2011 4:12 am

Re: Player death logic

Postby frag.machine » Fri Sep 16, 2016 1:05 am

At least for a start I'd try to do as you described.
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: Player death logic

Postby Subject9x » Mon Sep 26, 2016 12:03 pm

quick update: I haven't had a chance to try coding the location damage yet, but I did fix the player respawning issue by following your suggestions, thanks :)
Subject9x
 
Posts: 7
Joined: Thu Feb 10, 2011 4:12 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest