mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Merge pull request #403 from dpogue/coverity_patches
Coverity patches Closes #396.
This commit is contained in:
@ -2144,8 +2144,18 @@ PF_CONSOLE_CMD( App,
|
||||
if( !stricmp(eventStr, "Time") )
|
||||
{
|
||||
event = kTime;
|
||||
if (numParams < 2)
|
||||
{
|
||||
PrintString("'Time' expects a timestamp (in seconds)");
|
||||
return;
|
||||
}
|
||||
secs = params[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintString("Unknown event type. Options are 'Start', 'Stop', and 'Time'");
|
||||
return;
|
||||
}
|
||||
if( numParams > 3 )
|
||||
{
|
||||
reps = params[3];
|
||||
@ -3621,7 +3631,7 @@ PF_CONSOLE_CMD( Listener, XMode, "bool b", "Sets velocity and position to avatar
|
||||
|
||||
plSetListenerMsg *set = nil;
|
||||
plKey pKey = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
|
||||
plListener* pListener;
|
||||
plListener* pListener = nullptr;
|
||||
|
||||
if( (bool)params[ 0 ] )
|
||||
{
|
||||
|
@ -83,8 +83,11 @@ static const float kMaxHeight = 10.f;
|
||||
// overall rnd - overall probability that a candidate seed point (passing all other criteria) will be used
|
||||
//
|
||||
|
||||
static inline hsPoint3& hsP3(const Point3& p) { return *(hsPoint3*)&p; }
|
||||
static inline hsVector3& hsV3(const Point3& p) { return *(hsVector3*)&p; }
|
||||
|
||||
static inline const hsPoint3& hsP3(const Point3& p) { return reinterpret_cast<const hsPoint3&>(p); }
|
||||
static inline const hsVector3& hsV3(const Point3& p) { return reinterpret_cast<const hsVector3&>(p); }
|
||||
static inline hsPoint3& hsP3(Point3& p) { return reinterpret_cast<hsPoint3&>(p); }
|
||||
static inline hsVector3& hsV3(Point3& p) { return reinterpret_cast<hsVector3&>(p); }
|
||||
static inline Matrix3 Transpose(const Matrix3& m)
|
||||
{
|
||||
return Matrix3(m.GetColumn3(0), m.GetColumn3(1), m.GetColumn3(2), Point3(0,0,0));
|
||||
@ -1010,9 +1013,9 @@ BOOL plDistributor::IProjectVertex(const Point3& pt, const Point3& dir, float ma
|
||||
for( i = 0; i < faces.Count(); i++ )
|
||||
{
|
||||
int iFace = faces[i];
|
||||
const hsPoint3& p0 = hsP3(fSurfMesh->getVert(fSurfMesh->faces[iFace].getVert(0)) * fSurfToWorld);
|
||||
const hsPoint3& p1 = hsP3(fSurfMesh->getVert(fSurfMesh->faces[iFace].getVert(1)) * fSurfToWorld);
|
||||
const hsPoint3& p2 = hsP3(fSurfMesh->getVert(fSurfMesh->faces[iFace].getVert(2)) * fSurfToWorld);
|
||||
hsPoint3 p0 = hsP3(fSurfMesh->getVert(fSurfMesh->faces[iFace].getVert(0)) * fSurfToWorld);
|
||||
hsPoint3 p1 = hsP3(fSurfMesh->getVert(fSurfMesh->faces[iFace].getVert(1)) * fSurfToWorld);
|
||||
hsPoint3 p2 = hsP3(fSurfMesh->getVert(fSurfMesh->faces[iFace].getVert(2)) * fSurfToWorld);
|
||||
|
||||
Point3 plnPt = pt;
|
||||
if( triUtil.ProjectOntoPlaneAlongVector(p0, p1, p2, hsV3(dir), hsP3(plnPt)) )
|
||||
|
Reference in New Issue
Block a user