lfnetwork.com mark read register faq members calendar

Thread: float powf ( float x, int y ) error
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 04-14-2008, 08:54 AM   #1
stoiss
Rookie
 
stoiss's Avatar
 
Join Date: Feb 2007
Posts: 19
float powf ( float x, int y ) error

what is worng whit this code here? i have try to comment it out and remove it and i stil keep getting error

2> Creating library .\../Final/jampgamex86.lib and object .\../Final/jampgamex86.exp
2>g_saberbeh.obj : error LNK2019: unresolved external symbol _WalkCheck referenced in function _G_AddMercBalance
2>w_force.obj : error LNK2001: unresolved external symbol _WalkCheck
2>../../ojpenhanced/jampgamex86.dll : fatal error LNK1120: 1 unresolved externals

#if defined(_WIN32) && !defined(VS2005)
//[/VS2005]
//[/Linux]
//float powf ( float x, int y )
//{
// float r = x;
// for ( y--; y>0; y-- )
// r = r * r;
// return r;
//}
//[Linux]
stoiss is offline   you may: quote & reply,
Old 04-14-2008, 06:07 PM   #2
XycaleTh
Rookie
 
XycaleTh's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 67
Looks like the compiler can't find the WalkCheck function. It should be in w_saber.c.
XycaleTh is offline   you may: quote & reply,
Old 07-04-2008, 07:10 AM   #3
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
I got it to compile, but I'm not sure if I fixed it.

Anyway here it is:

Whenever you see this:
Code:
qboolean GAME_INLINE WalkCheck(gentity_t *self);
Replace it with this:
Code:
qboolean WalkCheck(gentity_t *self);
Whenever you see this:
Code:
extern qboolean GAME_INLINE WalkCheck(gentity_t *self);
Replace it with this:
Code:
extern qboolean WalkCheck(gentity_t *self);
And replace this function:
Code:
qboolean GAME_INLINE WalkCheck( gentity_t * self )
{
	if(PM_RunningAnim(self->client->ps.legsAnim))
	{
		return qfalse;
	}

	/* old method.  seems to have issues failing players when they're walking diagonally. :|
	float velocity = VectorLength(self->client->ps.velocity);
	if (velocity == 0)
	{
		return qtrue;
	}

	if( self->client->ps.groundEntityNum == ENTITYNUM_NONE )
	{//count as walking!
		return qtrue;
	}

	if(velocity >= (g_speed.value * (.37)) )
	{//on the ground and moving at run speeds.
		//G_Printf("Player %i is running: %f\n", self->s.number, velocity);
		return qfalse;
	}
	*/

	return qtrue;
}
With this:
Code:
qboolean WalkCheck( gentity_t * self )
{
	if(PM_RunningAnim(self->client->ps.legsAnim))
	{
		return qfalse;
	}

	/* old method.  seems to have issues failing players when they're walking diagonally. :|
	float velocity = VectorLength(self->client->ps.velocity);
	if (velocity == 0)
	{
		return qtrue;
	}

	if( self->client->ps.groundEntityNum == ENTITYNUM_NONE )
	{//count as walking!
		return qtrue;
	}

	if(velocity >= (g_speed.value * (.37)) )
	{//on the ground and moving at run speeds.
		//G_Printf("Player %i is running: %f\n", self->s.number, velocity);
		return qfalse;
	}
	*/

	return qtrue;
}
Hope that helps anyone lol.

Last edited by Cohsty243; 07-04-2008 at 07:59 AM.
Cohsty243 is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > float powf ( float x, int y ) error

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:29 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.