Hello
i´m currently messing around with the movementcode a bit and i´m a bit
stuck.
I tried to port my hl1 code to source which works out pretty good.
But since there seems to be no normal fly code like in HL 1, i dunno how
to get my hand on that.
And also on this part of code.
in player.cpp i used this in hl 1
void CBasePlayer::SetFly(bool on)
{
if(IsObserver())
return;
this->bFly = on;
if(on)
{
pev->movetype = MOVETYPE_PLAYERFLY;
ClearBits (pev->flags , FL_ONGROUND);
SetBits (pev->flags, FL_FLY);
pev->gravity = 0.0000001;
ALERT ( at_console, "Fly On\n" );
}
else
{
pev->movetype = MOVETYPE_WALK;
SetBits (pev->flags , FL_ONGROUND);
ClearBits (pev->flags, FL_FLY);
pev->gravity = 1;
ALERT ( at_console, "Fly Off\n" );
}
}
this is the code i try in source coding but it doesn´t seem to fully
work either.
void CBasePlayer::SetFly(bool on)
{
this->bFly = on;
if(on)
{
GetMoveType() = MOVETYPE_PLAYERFLYMOVE;
RemoveFlag( FL_ONGROUND );
AddFlag(FL_FLY);
SetGravity(0.1);
}
else
{
GetMoveType() = MOVETYPE_WALK;
RemoveFlag(FL_FLY);
AddFlag( FL_ONGROUND );
SetGravity(1);
}
}
the problem i´ve right now is as following:
When i enable the fly mode, it goes up until a decent high but it
doesn´t stay there, it goes down. its like a superslow jump.
my questions:
how can i change the code in player.cpp from hl 1 to source to work?
is there something like the PM_FlyMove from hl 1 in source?
greetz
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders