• R/O
  • SSH
  • HTTPS

gd10: Commit


Commit MetaInfo

Revisão131 (tree)
Hora2019-08-18 07:13:28
Autorhgtterry

Mensagem de Log

Strafe Right 170819

Mudança Sumário

Diff

--- Equity10/Eq_OgreListener.cpp (revision 130)
+++ Equity10/Eq_OgreListener.cpp (revision 131)
@@ -501,8 +501,31 @@
501501 // Right
502502 if (GetAsyncKeyState(65) < 0)
503503 {
504- mTranslateVector.x = -mMoveScale;
504+ if (GD_CameraMode == Enums::CamDetached)
505+ {
506+ mTranslateVector.x = -mMoveScale;
507+ }
508+ else
509+ {
510+ if (App->GDCL_Player->PlayerAdded == 1)
511+ {
512+ App->GDCL_Player->Move_Right();
513+ App->GDCL_Player->IsMOving_Right = 1;
514+ }
515+ }
505516 }
517+ else
518+ {
519+ if (GD_CameraMode == Enums::CamDetached)
520+ {
521+
522+ }
523+ else if (App->GDCL_Player->PlayerAdded == 1 && App->GDCL_Player->IsMOving_Right == 1)
524+ {
525+ App->GDCL_Player->Stop();
526+ App->GDCL_Player->IsMOving_Right = 0;
527+ }
528+ }
506529 // Left
507530 if (GetAsyncKeyState(68) < 0)
508531 {
--- Equity10/GD_Player.cpp (revision 130)
+++ Equity10/GD_Player.cpp (revision 131)
@@ -13,6 +13,7 @@
1313
1414 IsMOving = 0;
1515 IsMOving_Back = 0;
16+ IsMOving_Right = 0;
1617
1718 mOnGround = 1;
1819 Ground_speed = 2.2;
@@ -255,13 +256,8 @@
255256 btVector3 cur = mObject->getLinearVelocity();
256257 btVector3 basis = xform.getBasis()[2];
257258 vel = -Ground_speed * 10 * basis;
258- mObject->setLinearVelocity(btVector3(vel[0], cur[1], vel[2]));
259-
260- //btVector3 pos = mObject->getWorldTransform().getOrigin();
261- ////pos[0] = pos[0] + 0.02;
259+ mObject->setLinearVelocity(btVector3(vel[0], cur[1],vel[2]));
262260
263- //mObject->translate(btVector3(pos[0], pos[1], pos[2]));
264-
265261 //App->CL10_Utils->log(cur[1]);
266262 Check_Collisions();
267263 }
@@ -268,6 +264,40 @@
268264 }
269265
270266 // *************************************************************************
267+// * Move_Right Terry Bernie *
268+// *************************************************************************
269+void GD_Player::Move_Right(void)
270+{
271+ if (PlayerAdded == 1)
272+ {
273+ if (is_Animated == 1 && IsMOving == 0)
274+ {
275+
276+ App->Cl_Ogre->OgreListener->Animate_State->setEnabled(false);
277+ App->Cl_Ogre->OgreListener->Animate_State2->setEnabled(false);
278+ App->Cl_Ogre->OgreListener->Animate_State = Player_Ent->getAnimationState("RunBase");
279+ App->Cl_Ogre->OgreListener->Animate_State2 = Player_Ent->getAnimationState("RunTop");
280+ App->Cl_Ogre->OgreListener->Animate_State->setLoop(true);
281+ App->Cl_Ogre->OgreListener->Animate_State2->setLoop(true);
282+ App->Cl_Ogre->OgreListener->Animate_State->setEnabled(true);
283+ App->Cl_Ogre->OgreListener->Animate_State2->setEnabled(true);
284+
285+ }
286+
287+ btVector3 vel;
288+
289+ btTransform xform = mObject->getWorldTransform();
290+ btVector3 cur = mObject->getLinearVelocity();
291+ btVector3 basis = xform.getBasis()[2];
292+ vel = -Ground_speed * 10 * basis;
293+
294+ mObject->setLinearVelocity(btVector3(vel[2], cur[1], -vel[0]));
295+
296+ Check_Collisions();
297+ }
298+}
299+
300+// *************************************************************************
271301 // * Back Terry Bernie *
272302 // *************************************************************************
273303 void GD_Player::Back(void)
--- Equity10/GD_Player.h (revision 130)
+++ Equity10/GD_Player.h (revision 131)
@@ -10,6 +10,7 @@
1010 void SetUp(void);
1111 void Load_Player(void);
1212
13+ void Move_Right(void);
1314 void Stop(void);
1415 void Forward(void);
1516 void Back(void);
@@ -37,6 +38,7 @@
3738 bool mOnGround;
3839 bool IsMOving;
3940 bool IsMOving_Back;
41+ bool IsMOving_Right;
4042
4143 int Round;
4244 float Distance;
--- Equity10/VersionNo2.h (revision 130)
+++ Equity10/VersionNo2.h (revision 131)
@@ -39,21 +39,21 @@
3939 #ifndef _VERSIONNO__H_
4040 #define _VERSIONNO__H_
4141
42-#define VERSION_FULL 1.21.228.92
42+#define VERSION_FULL 1.22.228.4
4343
4444 #define VERSION_BASEYEAR 2019
4545 #define VERSION_DATE "2019-08-17"
46-#define VERSION_TIME "22:04:59"
46+#define VERSION_TIME "23:11:45"
4747
4848 #define VERSION_MAJOR 1
49-#define VERSION_MINOR 21
49+#define VERSION_MINOR 22
5050 #define VERSION_BUILDNO 228
51-#define VERSION_EXTEND 92
51+#define VERSION_EXTEND 4
5252
53-#define VERSION_FILE 1,21,228,92
54-#define VERSION_PRODUCT 1,21,228,99
55-#define VERSION_FILESTR "1,21,228,92\0"
56-#define VERSION_PRODUCTSTR "1,21,228,99\0"
53+#define VERSION_FILE 1,22,228,4
54+#define VERSION_PRODUCT 1,22,228,11
55+#define VERSION_FILESTR "1,22,228,4\0"
56+#define VERSION_PRODUCTSTR "1,22,228,11\0"
5757 #define VERSION_EVERSION "0.3.4.0\0"
5858
5959 #endif
\ No newline at end of file
Show on old repository browser