Re: Kurok PSP errors
and yes rtems got one
and bingo http://courses.missouristate.edu/KenVollmar/MARS/ heres the assembler
Moderator: Inside3D Admins
Max_Salivan wrote:UPD:i am compile it
added
#define FL_MONSTERCLIP 8192 // Only solid to entities with FL_MONSTER
but doors and buttons dont work,i am pass through them

Baker wrote:Max_Salivan wrote:UPD:i am compile it
added
#define FL_MONSTERCLIP 8192 // Only solid to entities with FL_MONSTER
but doors and buttons dont work,i am pass through them
I'm glad you got it to compile. I can't help you with debugging your own code, but sv_physics.c and world.c are 2 places that might involve that kind of thing.
You might consider using WinMerge to compare the old and new files (especially sv_physics.c and world.c) to look through and try to determine what change is making that happen.
/*
==================
SV_ClipMoveToEntity
Handles selection or creation of a clipping hull, and offseting (and
eventually rotation) of the end points
==================
*/
trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
{
trace_t trace;
vec3_t offset, temp;
vec3_t start_l, end_l;
hull_t *hull;
qboolean rotated;
matrix4x4 matrix;
// fill in a default trace
memset (&trace, 0, sizeof(trace_t));
trace.fraction = 1;
trace.allsolid = true;
VectorCopy (end, trace.endpos);
// get the clipping hull
hull = SV_HullForEntity (ent, mins, maxs, offset);
// g-cont. get support for rotational brush-models
if( ent != EDICT_NUM( 0 ) && ent->v.solid == SOLID_BSP && !VectorIsNull( ent->v.angles ))
rotated = true;
else rotated = false;
if( rotated )
{
Matrix4x4_CreateFromEntity( matrix, ent->v.angles, offset, 1.0f );
Matrix4x4_VectorITransform( matrix, start, start_l );
Matrix4x4_VectorITransform( matrix, end, end_l );
}
else
{
VectorSubtract( start, offset, start_l );
VectorSubtract( end, offset, end_l );
}
// trace a line through the apropriate clipping hull
SV_RecursiveHullCheck (hull, hull->firstclipnode, 0, 1, start_l, end_l, &trace);
if( trace.fraction != 1.0f )
{
// compute endpos (generic case)
VectorLerp( start, trace.fraction, end, trace.endpos );
if( rotated )
{
// transform plane
VectorCopy( trace.plane.normal, temp );
Matrix4x4_TransformPositivePlane( matrix, temp, trace.plane.dist, trace.plane.normal, &trace.plane.dist );
}
else
{
// make dist adjustments
trace.plane.dist = DotProduct( trace.endpos, trace.plane.normal );
}
}
// did we clip the move?
if (trace.fraction < 1.0f || trace.startsolid )
trace.ent = ent;
return trace;
}/*
==================
SV_ClipMoveToEntity
Handles selection or creation of a clipping hull, and offseting (and
eventually rotation) of the end points
==================
*/
trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
{
trace_t trace;
vec3_t offset, temp;
vec3_t start_l, end_l;
hull_t *hull;
qboolean rotated;
matrix4x4 matrix;
// fill in a default trace
memset (&trace, 0, sizeof(trace_t));
trace.fraction = 1;
trace.allsolid = true;
VectorCopy (end, trace.endpos);
// get the clipping hull
hull = SV_HullForEntity (ent, mins, maxs, offset);
// g-cont. get support for rotational brush-models
if( ent != EDICT_NUM( 0 ) && ent->v.solid == SOLID_BSP && !VectorIsNull( ent->v.angles ))
rotated = true;
else rotated = false;
if( rotated )
{
Matrix4x4_CreateFromEntity( matrix, ent->v.angles, offset, 1.0f );
Matrix4x4_VectorITransform( matrix, start, start_l );
Matrix4x4_VectorITransform( matrix, end, end_l );
}
else
{
VectorSubtract( start, offset, start_l );
VectorSubtract( end, offset, end_l );
}
// trace a line through the apropriate clipping hull
SV_RecursiveHullCheck (hull, hull->firstclipnode, 0, 1, start_l, end_l, &trace);
if( trace.fraction != 1.0f )
{
// compute endpos (generic case)
VectorLerp( start, trace.fraction, end, trace.endpos );
if( rotated )
{
// transform plane
VectorCopy( trace.plane.normal, temp );
Matrix4x4_TransformPositivePlane( matrix, temp, trace.plane.dist, trace.plane.normal, &trace.plane.dist );
}
else
{
// make dist adjustments
trace.plane.dist = DotProduct( trace.endpos, trace.plane.normal );
}
}
// did we clip the move?
if (trace.fraction < 1.0f || trace.startsolid )
trace.ent = ent;
return trace;
}Baker wrote:There are physics changes in pr_cmds.c, sv_phys.c and world.c with stuff like this
- Code:
/*
==================
SV_ClipMoveToEntity
Handles selection or creation of a clipping hull, and offseting (and
eventually rotation) of the end points
==================
*/
trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
{
trace_t trace;
vec3_t offset, temp;
vec3_t start_l, end_l;
hull_t *hull;
qboolean rotated;
matrix4x4 matrix;
// fill in a default trace
memset (&trace, 0, sizeof(trace_t));
trace.fraction = 1;
trace.allsolid = true;
VectorCopy (end, trace.endpos);
// get the clipping hull
hull = SV_HullForEntity (ent, mins, maxs, offset);
// g-cont. get support for rotational brush-models
if( ent != EDICT_NUM( 0 ) && ent->v.solid == SOLID_BSP && !VectorIsNull( ent->v.angles ))
rotated = true;
else rotated = false;
if( rotated )
{
Matrix4x4_CreateFromEntity( matrix, ent->v.angles, offset, 1.0f );
Matrix4x4_VectorITransform( matrix, start, start_l );
Matrix4x4_VectorITransform( matrix, end, end_l );
}
else
{
VectorSubtract( start, offset, start_l );
VectorSubtract( end, offset, end_l );
}
// trace a line through the apropriate clipping hull
SV_RecursiveHullCheck (hull, hull->firstclipnode, 0, 1, start_l, end_l, &trace);
if( trace.fraction != 1.0f )
{
// compute endpos (generic case)
VectorLerp( start, trace.fraction, end, trace.endpos );
if( rotated )
{
// transform plane
VectorCopy( trace.plane.normal, temp );
Matrix4x4_TransformPositivePlane( matrix, temp, trace.plane.dist, trace.plane.normal, &trace.plane.dist );
}
else
{
// make dist adjustments
trace.plane.dist = DotProduct( trace.endpos, trace.plane.normal );
}
}
// did we clip the move?
if (trace.fraction < 1.0f || trace.startsolid )
trace.ent = ent;
return trace;
}
And this ...
- Code:
/*
==================
SV_ClipMoveToEntity
Handles selection or creation of a clipping hull, and offseting (and
eventually rotation) of the end points
==================
*/
trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
{
trace_t trace;
vec3_t offset, temp;
vec3_t start_l, end_l;
hull_t *hull;
qboolean rotated;
matrix4x4 matrix;
// fill in a default trace
memset (&trace, 0, sizeof(trace_t));
trace.fraction = 1;
trace.allsolid = true;
VectorCopy (end, trace.endpos);
// get the clipping hull
hull = SV_HullForEntity (ent, mins, maxs, offset);
// g-cont. get support for rotational brush-models
if( ent != EDICT_NUM( 0 ) && ent->v.solid == SOLID_BSP && !VectorIsNull( ent->v.angles ))
rotated = true;
else rotated = false;
if( rotated )
{
Matrix4x4_CreateFromEntity( matrix, ent->v.angles, offset, 1.0f );
Matrix4x4_VectorITransform( matrix, start, start_l );
Matrix4x4_VectorITransform( matrix, end, end_l );
}
else
{
VectorSubtract( start, offset, start_l );
VectorSubtract( end, offset, end_l );
}
// trace a line through the apropriate clipping hull
SV_RecursiveHullCheck (hull, hull->firstclipnode, 0, 1, start_l, end_l, &trace);
if( trace.fraction != 1.0f )
{
// compute endpos (generic case)
VectorLerp( start, trace.fraction, end, trace.endpos );
if( rotated )
{
// transform plane
VectorCopy( trace.plane.normal, temp );
Matrix4x4_TransformPositivePlane( matrix, temp, trace.plane.dist, trace.plane.normal, &trace.plane.dist );
}
else
{
// make dist adjustments
trace.plane.dist = DotProduct( trace.endpos, trace.plane.normal );
}
}
// did we clip the move?
if (trace.fraction < 1.0f || trace.startsolid )
trace.ent = ent;
return trace;
}
It isn't unheard of for floating point functions on the PSP to work differently, poorly, unexpectedly on a PSP. And there are physics changes and matrix transformations and so forth in all those files. You'd need to find someone dedicated to porting that and debugging that on a PSP, depending on what the issue could be it might take them a lot of time (weeks?) to identify why that is happening. Sorry.![]()
I do hope you get it to work.
Max_Salivan wrote:oh thanks for help,Baker,I cant find one who will do it...
this is the end for Portal to PSP(i think)
without this physics,mod has many bugs with cubes and turrets-_-
Baker wrote:Max_Salivan wrote:oh thanks for help,Baker,I cant find one who will do it...
this is the end for Portal to PSP(i think)
without this physics,mod has many bugs with cubes and turrets-_-
That sucks
The PSP really hates some floating point stuff. I had to kill matrix functions once for an engine build to run. It wasn't that complex either, it mostly involved gluUnproject and a few matrix functions that requires. I think I also had to remove MH's chasecam fix for similar reasons if I recall correctly. I never achieved an understanding of why or what the issue was nor a work around, but I #ifdef'd the code out of the PSP build. The PSP and some types of floating point don't seem to mix.
And your code is using a lot of matrix functions.
Users browsing this forum: No registered users and 4 guests