mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
@ -368,11 +368,11 @@ PF_CONSOLE_CMD( Avatar_Multistage, Trigger, "string multiComp", "Triggers the na
|
|||||||
|
|
||||||
// Setup the event data in case this is a OneShot responder that needs it
|
// Setup the event data in case this is a OneShot responder that needs it
|
||||||
plKey playerKey = plAvatarMgr::GetInstance()->GetLocalAvatar()->GetKey();
|
plKey playerKey = plAvatarMgr::GetInstance()->GetLocalAvatar()->GetKey();
|
||||||
proPickedEventData *ed = new proPickedEventData;
|
proPickedEventData ed;
|
||||||
ed->fPicker = playerKey;
|
ed.fPicker = playerKey;
|
||||||
ed->fPicked = key; // ???
|
ed.fPicked = key; // ???
|
||||||
msg->AddEvent(ed);
|
msg->AddEvent(&ed);
|
||||||
|
|
||||||
// Send it to the responder modifier
|
// Send it to the responder modifier
|
||||||
msg->AddReceiver(key);
|
msg->AddReceiver(key);
|
||||||
plgDispatch::MsgSend(msg);
|
plgDispatch::MsgSend(msg);
|
||||||
|
@ -163,7 +163,7 @@ class pfPatcherStream : public plZlibStream
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
pfPatcherStream(pfPatcherWorker* parent, const plFileName& filename, uint64_t size)
|
pfPatcherStream(pfPatcherWorker* parent, const plFileName& filename, uint64_t size)
|
||||||
: fParent(parent), fFilename(filename), fFlags(0), fBytesWritten(0)
|
: fParent(parent), fFilename(filename), fFlags(0), fBytesWritten(0), fDLStartTime(0.f)
|
||||||
{
|
{
|
||||||
fParent->fTotalBytes += size;
|
fParent->fTotalBytes += size;
|
||||||
fOutput = new hsRAMStream;
|
fOutput = new hsRAMStream;
|
||||||
@ -335,7 +335,7 @@ static void IFileThingDownloadCB(ENetError result, void* param, const plFileName
|
|||||||
// ===================================================
|
// ===================================================
|
||||||
|
|
||||||
pfPatcherWorker::pfPatcherWorker() :
|
pfPatcherWorker::pfPatcherWorker() :
|
||||||
fStarted(false), fCurrBytes(0), fTotalBytes(0), fRequestActive(true)
|
fStarted(false), fCurrBytes(0), fTotalBytes(0), fRequestActive(true), fParent(nullptr)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
pfPatcherWorker::~pfPatcherWorker()
|
pfPatcherWorker::~pfPatcherWorker()
|
||||||
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
|
|
||||||
// Standard Library Includes
|
// Standard Library Includes
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <array>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <locale>
|
#include <locale>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -132,9 +132,9 @@ PyObject* pyMatrix44::GetRightAxis() const
|
|||||||
return pyVector3::New(fMatrix.GetAxis(hsMatrix44::kRight));
|
return pyVector3::New(fMatrix.GetAxis(hsMatrix44::kRight));
|
||||||
}
|
}
|
||||||
|
|
||||||
float* pyMatrix44::GetData() const
|
mat44_t pyMatrix44::GetData() const
|
||||||
{
|
{
|
||||||
float *res = new float[4*4];
|
mat44_t res;
|
||||||
res[0] = fMatrix.fMap[0][0]; res[1] = fMatrix.fMap[0][1]; res[2] = fMatrix.fMap[0][2]; res[3] = fMatrix.fMap[0][3];
|
res[0] = fMatrix.fMap[0][0]; res[1] = fMatrix.fMap[0][1]; res[2] = fMatrix.fMap[0][2]; res[3] = fMatrix.fMap[0][3];
|
||||||
res[4] = fMatrix.fMap[1][0]; res[5] = fMatrix.fMap[1][1]; res[6] = fMatrix.fMap[1][2]; res[7] = fMatrix.fMap[1][3];
|
res[4] = fMatrix.fMap[1][0]; res[5] = fMatrix.fMap[1][1]; res[6] = fMatrix.fMap[1][2]; res[7] = fMatrix.fMap[1][3];
|
||||||
res[8] = fMatrix.fMap[2][0]; res[9] = fMatrix.fMap[2][1]; res[10] = fMatrix.fMap[2][2]; res[11] = fMatrix.fMap[2][3];
|
res[8] = fMatrix.fMap[2][0]; res[9] = fMatrix.fMap[2][1]; res[10] = fMatrix.fMap[2][2]; res[11] = fMatrix.fMap[2][3];
|
||||||
|
@ -42,12 +42,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#ifndef pyMatrix44_h_inc
|
#ifndef pyMatrix44_h_inc
|
||||||
#define pyMatrix44_h_inc
|
#define pyMatrix44_h_inc
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include "hsMatrix44.h"
|
#include "hsMatrix44.h"
|
||||||
#include "pyGlueHelpers.h"
|
#include "pyGlueHelpers.h"
|
||||||
|
|
||||||
class pyPoint3;
|
class pyPoint3;
|
||||||
class pyVector3;
|
class pyVector3;
|
||||||
|
|
||||||
|
typedef std::array<float, 4*4> mat44_t;
|
||||||
|
|
||||||
class pyMatrix44
|
class pyMatrix44
|
||||||
{
|
{
|
||||||
@ -93,7 +95,8 @@ public:
|
|||||||
PyObject* GetUpAxis() const; // returns pyVector3
|
PyObject* GetUpAxis() const; // returns pyVector3
|
||||||
PyObject* GetRightAxis() const; // returns pyVector3
|
PyObject* GetRightAxis() const; // returns pyVector3
|
||||||
|
|
||||||
float* GetData() const;
|
/** Returns a copy of the 4x4 matrix data */
|
||||||
|
mat44_t GetData() const;
|
||||||
void SetData(const float mat[]);
|
void SetData(const float mat[]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
*==LICENSE==*/
|
*==LICENSE==*/
|
||||||
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
|
||||||
#include "pyGeometry3.h"
|
#include "pyGeometry3.h"
|
||||||
#include "pyMatrix44.h"
|
#include "pyMatrix44.h"
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
@ -302,21 +303,19 @@ PYTHON_METHOD_DEFINITION_NOARGS(ptMatrix44, right)
|
|||||||
|
|
||||||
PYTHON_METHOD_DEFINITION_NOARGS(ptMatrix44, getData)
|
PYTHON_METHOD_DEFINITION_NOARGS(ptMatrix44, getData)
|
||||||
{
|
{
|
||||||
float *mat = self->fThis->GetData();
|
mat44_t mat = self->fThis->GetData();
|
||||||
|
|
||||||
PyObject *retVal = Py_BuildValue("(ffff)(ffff)(ffff)(ffff)",
|
PyObject* retVal = Py_BuildValue("(ffff)(ffff)(ffff)(ffff)",
|
||||||
mat[0], mat[1], mat[2], mat[3],
|
mat[0], mat[1], mat[2], mat[3],
|
||||||
mat[4], mat[5], mat[6], mat[7],
|
mat[4], mat[5], mat[6], mat[7],
|
||||||
mat[8], mat[9], mat[10], mat[11],
|
mat[8], mat[9], mat[10], mat[11],
|
||||||
mat[12], mat[13], mat[14], mat[15]);
|
mat[12], mat[13], mat[14], mat[15]);
|
||||||
|
|
||||||
if (retVal == NULL)
|
if (!retVal) {
|
||||||
{
|
|
||||||
PyErr_SetString(PyExc_TypeError, "setData expects a 4x4 tuple of floats");
|
PyErr_SetString(PyExc_TypeError, "setData expects a 4x4 tuple of floats");
|
||||||
PYTHON_RETURN_ERROR;
|
PYTHON_RETURN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete mat;
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,7 +370,10 @@ public:
|
|||||||
void SetType(notificationType type) { fType = type; }
|
void SetType(notificationType type) { fType = type; }
|
||||||
void SetState(float state) { fState = state; }
|
void SetState(float state) { fState = state; }
|
||||||
|
|
||||||
// event records for the notify message
|
/**
|
||||||
|
* Adds an arbitrary event to this notify message.
|
||||||
|
* \note This copies \a ed.
|
||||||
|
*/
|
||||||
void AddEvent( proEventData* ed);
|
void AddEvent( proEventData* ed);
|
||||||
void AddCollisionEvent( bool enter, const plKey &other, const plKey &self, bool onlyOneCollision=true );
|
void AddCollisionEvent( bool enter, const plKey &other, const plKey &self, bool onlyOneCollision=true );
|
||||||
void AddPickEvent( const plKey &other, const plKey& self, bool enabled, hsPoint3 hitPoint );
|
void AddPickEvent( const plKey &other, const plKey& self, bool enabled, hsPoint3 hitPoint );
|
||||||
|
@ -56,10 +56,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
void plLogicModBase::ConsoleTrigger(plKey playerKey)
|
void plLogicModBase::ConsoleTrigger(plKey playerKey)
|
||||||
{
|
{
|
||||||
// Setup the event data in case this is a OneShot responder that needs it
|
// Setup the event data in case this is a OneShot responder that needs it
|
||||||
proPickedEventData *ed = new proPickedEventData;
|
proPickedEventData ed;
|
||||||
ed->fPicker = playerKey;
|
ed.fPicker = playerKey;
|
||||||
ed->fPicked = nil;
|
ed.fPicked = nullptr;
|
||||||
fNotify->AddEvent(ed);
|
fNotify->AddEvent(&ed);
|
||||||
|
|
||||||
Trigger(false);
|
Trigger(false);
|
||||||
|
|
||||||
|
@ -759,11 +759,11 @@ void plNetLinkingMgr::OfferLinkToPlayer( const plAgeLinkStruct * inInfo, uint32_
|
|||||||
// for backwards compatibility
|
// for backwards compatibility
|
||||||
void plNetLinkingMgr::OfferLinkToPlayer( const plAgeInfoStruct * inInfo, uint32_t playerID )
|
void plNetLinkingMgr::OfferLinkToPlayer( const plAgeInfoStruct * inInfo, uint32_t playerID )
|
||||||
{
|
{
|
||||||
plAgeLinkStruct *ageLink = new plAgeLinkStruct;
|
plAgeLinkStruct ageLink;
|
||||||
|
|
||||||
ageLink->GetAgeInfo()->CopyFrom(inInfo);
|
ageLink.GetAgeInfo()->CopyFrom(inInfo);
|
||||||
ageLink->SetLinkingRules(plNetCommon::LinkingRules::kBasicLink);
|
ageLink.SetLinkingRules(plNetCommon::LinkingRules::kBasicLink);
|
||||||
OfferLinkToPlayer(ageLink, playerID);
|
OfferLinkToPlayer(&ageLink, playerID);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -187,7 +187,9 @@ int plSDLMgr::Read(hsStream* s, plSDL::DescriptorList* dl)
|
|||||||
plStateDescriptor* sd=new plStateDescriptor;
|
plStateDescriptor* sd=new plStateDescriptor;
|
||||||
if (sd->Read(s))
|
if (sd->Read(s))
|
||||||
dl->push_back(sd);
|
dl->push_back(sd);
|
||||||
}
|
else
|
||||||
|
delete sd; // well that sucked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user