RE: [hlcoders] PM_PreventMegaBunnyJumping()

2003-08-24 Thread Adrian Finol
 Bunny hopping in TFC could be done in several ways, you could do it the old
fashioned way, which was just jumping and strafing so you could gain
velocity. Or you could fire a rocket behind you so it'd push you forward and
then continue hopping along without losing speed.

 Tweaking those values shouldn't prevent rocket jumping since you gain the
extra push AFTER you've jumped. This code is only run everytime you jump,
but if after you're in the air you get pushed, your velocity won't be capped
until you try to jump again.



-Original Message-
From: Brian A. Stumm [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 23, 2003 3:27 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [hlcoders] PM_PreventMegaBunnyJumping()


On Sat, 23 Aug 2003, Adrian Finol wrote:

  The 1.7 and 0.65 are just two numbers we chose after testing and tweaking
 the code around.

  If you read the code, BUNNYJUMP_MAX_SPEED_FACTOR is used as a cap on how
 fast you can go. We still let you bunny hop, but instead of going uncapped
 like before (reaching speeds of mach 3!) we now slow you down so you can't
 exceed the player's maxspeed * 1.7, which is still a little high, but we
 thought it fit TFC since we didn't want to get rid of all the little
tricks
 you could do with the rocket launcher and grenades.

Are you saying that values lower (perhaps I should say too much lower)
than 1.7 would eliminate rocket jumping and conc jumping in TFC? I do not
wish to do that and have other ideas on how to rid bhop from tfc without
losing the various rocket/gren jumps. But when I stumbled upon the valve
bhop prevention code I thought perhaps I could just tweak that in some
seperate hooking code (botmans not metamod).


___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



[hlcoders] Re: hlcoders digest, Vol 1 #1037 - 10 msgs

2003-08-24 Thread Scott McNaught
I have catchall on my domain too.

Im getting about 100 of them per day too.

I dont have broadband so I cant afford to sit there and download ~30mb of
virus a day.

Maybe the person with klez will be the only one not receiving the viruses.
(because its likely that viruses dont send back to the already infected
person)

If your not getting viruses, could you please scan your system =P

Some advice for others with this problem is to actually set the filter up on
your web server.  Some mail servers will have a web interface for doing
this.  That way you wont have to even download it, and outlook will be none
the wiser ;)

Cheers!

Scott McNaught
HL Rally PR Manager
http://hlrally.net


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 23, 2003 9:15 PM
Subject: hlcoders digest, Vol 1 #1037 - 10 msgs


 Send hlcoders mailing list submissions to
 [EMAIL PROTECTED]

 To subscribe or unsubscribe via the World Wide Web, visit
 http://list.valvesoftware.com/mailman/listinfo/hlcoders
 or, via email, send a message with subject or body 'help' to
 [EMAIL PROTECTED]

 You can reach the person managing the list at
 [EMAIL PROTECTED]

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of hlcoders digest...








 Today's Topics:

1. About outlook (NOT half-life related) (Kyle)
2. Re: About outlook (NOT half-life related) (Jeroen ShadowLord
Bogers)
3. Re: About outlook (NOT half-life related) (Steven Van Ingelgem)
4. Re: About outlook (NOT half-life related) (Philip)
5. Re: About outlook (NOT half-life related) (Tim Reynolds)
6. [hlds] List server upgrade (Alfred Reynolds)
7. Re: About outlook (NOT half-life related) (Sniper)
8. Re: About outlook (NOT half-life related) (MoD)
9. PM_PreventMegaBunnyJumping() (Brian A. Stumm)
   10. RE: About outlook (NOT half-life related) (Jeff Katz)







 ___
 To unsubscribe, edit your list preferences, or view the list archives,
please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders





___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



[hlcoders] Creating and removing entities

2003-08-24 Thread Kyle
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
How the heck do you create and delete entities without crashing half-life? (
I thought this was simple too)

I used valve's code as examples but no matter what combination of deleting a
freaking entities, hl always manages to crap out.



Here is some code of mine for dropping an HEV entity.



Keep in minde, this function is static



void CItemBattery::Drop(CBasePlayer* pPlayer)

{

CBaseEntity *pEnt;

CItem *pTemp=NULL;



pPlayer-pev-armorvalue -= 15;



UTIL_MakeVectors( pPlayer-pev-v_angle );

pEnt = CBaseEntity::Create( item_battery, pPlayer-pev-origin
,pPlayer-pev-angles, pPlayer-edict() );

UTIL_SetOrigin( pEnt-pev, pPlayer-pev-origin +
pPlayer-pev-view_ofs + gpGlobals-v_forward * 64);



pEnt-pev-velocity = gpGlobals-v_forward * 400;

pEnt-pev-angles = UTIL_VecToAngles (pEnt-pev-velocity);

pEnt-pev-angles.x = 0;



CItemBattery *pBattery = (CItemBattery *)pEnt;

pEnt-pev-spawnflags |= SF_NORESPAWN;

}



now let me know if this is wrong, because otherwise I think its right
because it works.



Now in CItem::Spawn() (battery is derived form this of course)  it looks
like this:





void CItem::Spawn( void )

{

//  m_bCanRespawn = TRUE;

pev-movetype = MOVETYPE_TOSS;

pev-solid = SOLID_TRIGGER;

UTIL_SetOrigin( pev, pev-origin );

UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 16));

SetTouch(ItemTouch);

SetThink(ItemThink);

if (DROP_TO_FLOOR(ENT(pev)) == 0)

{

ALERT(at_error, Item %s fell out of level at
%f,%f,%f, STRING( pev-classname ), pev-origin.x, pev-origin.y,
pev-origin.z);

UTIL_Remove( this );

return;

}

pev-nextthink = gpGlobals-time + 0.1;

m_fTime = gpGlobals-time +0.5;

}





That looks right to me, and it seems to work





Now here is some new code I added.

I don't want items people drop to stay for more then 30 seconds nor do I
want them to respawn so I do this



void CItem::ItemThink( void )

{

if(pev-spawnflags  SF_NORESPAWN)

{

if(m_fTime  gpGlobals-time )

{

SetThink( NULL );

SetTouch( NULL );

UTIL_Remove( this );

}

}

pev-nextthink = gpGlobals-time + 1.0;

}



SOMETHING is wrong with that, I don't know what, I don't know how but
something because after about the 400th battery I drop, hl crashes (Note
that the batteries disappear, there are not 400 on the screen, only 3 or 4,
I thought they were getting deleted by hl thinks otherwise)



Now to test my code, I set the life spawn of the battery to about 0.5
seconds, and I allow my self to drop infinite. it works for a while.. like I
said probably about 400 then hl crashes.. some kind of pointer crash .tried
to access blah blah at 0x00, somewhere buried in ancient artifact they
call the hl engine.



Someone give me some advice here because I'm clueless how to make this
entities stuff delete correctly,

Thank you





--


___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



RE: [hlcoders] Creating and removing entities

2003-08-24 Thread Cale 'Mazor' Dunlap
Generally if its giving you crap about referencing memory at 0x
then its probably due to a null pointer or something. Might wanna start
doing checks to see if the entity is there if you're doing something to
it.

Example (bad):
CBaseEntity *pEnt = NULL;
pEnt = CBaseEntity::Create(someentitythatcannotbefound, ...);

pEnt-pev-team = 1; *CRASH*

Example (good):
CBaseEntity *pEnt = NULL;
pEnt = CBaseEntity::Create(someentitythatcannotbefound, ...);

if( pEnt )
{
pEnt-pev-team = 1; *no crash*
// TODO: Other entity stuff
}

Even though you might not get the desired affect you wanted to obtain
originally, it won't crash, but it WILL execute if there is an entity to
execute that line onto.

Little something I learned after doing the same thing myself, tee hee.

-Cale 'Mazor' Dunlap
Firearms Programmer

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kyle
Sent: Sunday, August 24, 2003 2:57 AM
To: [EMAIL PROTECTED]
Subject: [hlcoders] Creating and removing entities

This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
How the heck do you create and delete entities without crashing
half-life? (
I thought this was simple too)

I used valve's code as examples but no matter what combination of
deleting a
freaking entities, hl always manages to crap out.



Here is some code of mine for dropping an HEV entity.



Keep in minde, this function is static



void CItemBattery::Drop(CBasePlayer* pPlayer)

{

CBaseEntity *pEnt;

CItem *pTemp=NULL;



pPlayer-pev-armorvalue -= 15;



UTIL_MakeVectors( pPlayer-pev-v_angle );

pEnt = CBaseEntity::Create( item_battery,
pPlayer-pev-origin
,pPlayer-pev-angles, pPlayer-edict() );

UTIL_SetOrigin( pEnt-pev, pPlayer-pev-origin +
pPlayer-pev-view_ofs + gpGlobals-v_forward * 64);



pEnt-pev-velocity = gpGlobals-v_forward * 400;

pEnt-pev-angles = UTIL_VecToAngles (pEnt-pev-velocity);

pEnt-pev-angles.x = 0;



CItemBattery *pBattery = (CItemBattery *)pEnt;

pEnt-pev-spawnflags |= SF_NORESPAWN;

}



now let me know if this is wrong, because otherwise I think its right
because it works.



Now in CItem::Spawn() (battery is derived form this of course)  it looks
like this:





void CItem::Spawn( void )

{

//  m_bCanRespawn = TRUE;

pev-movetype = MOVETYPE_TOSS;

pev-solid = SOLID_TRIGGER;

UTIL_SetOrigin( pev, pev-origin );

UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 16));

SetTouch(ItemTouch);

SetThink(ItemThink);

if (DROP_TO_FLOOR(ENT(pev)) == 0)

{

ALERT(at_error, Item %s fell out of level at
%f,%f,%f, STRING( pev-classname ), pev-origin.x, pev-origin.y,
pev-origin.z);

UTIL_Remove( this );

return;

}

pev-nextthink = gpGlobals-time + 0.1;

m_fTime = gpGlobals-time +0.5;

}





That looks right to me, and it seems to work





Now here is some new code I added.

I don't want items people drop to stay for more then 30 seconds nor do I
want them to respawn so I do this



void CItem::ItemThink( void )

{

if(pev-spawnflags  SF_NORESPAWN)

{

if(m_fTime  gpGlobals-time )

{

SetThink( NULL );

SetTouch( NULL );

UTIL_Remove( this );

}

}

pev-nextthink = gpGlobals-time + 1.0;

}



SOMETHING is wrong with that, I don't know what, I don't know how but
something because after about the 400th battery I drop, hl crashes (Note
that the batteries disappear, there are not 400 on the screen, only 3 or
4,
I thought they were getting deleted by hl thinks otherwise)



Now to test my code, I set the life spawn of the battery to about 0.5
seconds, and I allow my self to drop infinite. it works for a while..
like I
said probably about 400 then hl crashes.. some kind of pointer crash
.tried
to access blah blah at 0x00, somewhere buried in ancient artifact
they
call the hl engine.



Someone give me some advice here because I'm clueless how to make this
entities stuff delete correctly,

Thank you





--


___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders





___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Model Hitboxes

2003-08-24 Thread Michael Fisher

 I am trying to learn how the hitboxes are determined during the game.
Do a copy of the models need to reside on the server in order to correctly
read the hitboxes? Or are the hitboxes read from the client?

Thanks,

desNotes
[EMAIL PROTECTED]




___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



RE: [hlcoders] Creating and removing entities

2003-08-24 Thread Kyle
You are right, I remember a while ago , I made the weapons able to drop and
gave em a think function that would terminate after 30 seconds if no one
picked it up and respawn was turned off, but I forgot to turn this off after
someone picked it up, so when it terminated after they owned it.. they could
no longer access it and 0x0 was the next thing I saw :) That was an easy
debug fix

Regards to my problem, I recompiled to client and non of these problems have
been happened anymore, I'm sure my code is sound, you can take a look at it,
it actually works, and drop entities and removes them and no other entity
was trying to use it. Hl has crashed on me many different ways for weird
reasons, a clean recompile seemed to work for me this time. If it crashes
again I will do some serious assembly debugging.

Thx guys

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of matthew lewis
Sent: Sunday, August 24, 2003 9:44 AM
To: [EMAIL PROTECTED]
Subject: [hlcoders] Creating and removing entities

99% of the time when you get crashes from an entity that was deleted, it's
because some other entity is still trying to reference it. In other words,
something is still trying to use the battery even though it's been removed
from the world. Some other cases are an owned entity who tries to send
feedback to it's owner who is gone. For example, a sentry gun that is trying
to add points to a player's score where the player has disconnected. The
trick is to be sure to notify any entities in the world that might be trying
to use a deleted entity that the entity is now gone and to stop referencing
it since the pointers are no longer valid.


___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders