From: Andrew C. <ac...@us...> - 2002-07-28 18:26:56
|
Update of /cvsroot/planeshift/planeshift/src/client/aws In directory usw-pr-cvs1:/tmp/cvs-serv3498/src/client/aws Modified Files: psplayerwindow.cpp psplayerwindow.h Log Message: Added a range when interacting with items Index: psplayerwindow.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/aws/psplayerwindow.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** psplayerwindow.cpp 27 Jul 2002 14:49:21 -0000 1.10 --- psplayerwindow.cpp 28 Jul 2002 18:26:52 -0000 1.11 *************** *** 195,198 **** --- 195,199 ---- parent = Parent; engine = NULL; + mainActor = NULL; } *************** *** 233,238 **** // Notify the server of the selection ! // CS_ID mappedid = selent->GetID(); CS_ID mappedid = engine->GetCelClient()->GetNetPersist()->GetMappedID(selent); --- 234,260 ---- // Notify the server of the selection + + iPcProximityList* selectedProx = + CEL_QUERY_PROPCLASS(selent->GetPropertyClassList(), iPcProximityList); ! //make sure that there is an active actor entity available ! if ( mainActor == NULL ) ! { ! iPSEngine* psengine = CS_QUERY_REGISTRY(object_reg, iPSEngine); ! psCelClient *cel = psengine->GetCelClient(); ! mainActor = cel->GetMainActor(); ! psengine->DecRef(); ! } ! if ( mainActor == NULL ) ! { ! SCF_DEC_REF(selectedProx); ! return false; ! } ! ! if ( selectedProx ) ! { ! printf ("Range to item: %f\n", selectedProx->RangeTo(mainActor) ); ! } ! CS_ID mappedid = engine->GetCelClient()->GetNetPersist()->GetMappedID(selent); Index: psplayerwindow.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/aws/psplayerwindow.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** psplayerwindow.h 4 Jul 2002 04:09:43 -0000 1.4 --- psplayerwindow.h 28 Jul 2002 18:26:52 -0000 1.5 *************** *** 22,25 **** --- 22,26 ---- #include "psbehave/psbehave.h" + #include "psprop/pc/pspcproxlist.h" #include "pscomp.h" #include "iclient/iwinmgr.h" *************** *** 37,40 **** --- 38,44 ---- protected: iPSEngine *engine; + + ///The main actor entity + iCelEntity* mainActor; public: |