--- C:/Cafu-src-r76/Games/DeathMatch/Code/HumanPlayer1.cpp	Di Dez 22 17:39:30 2009
+++ C:/Cafu-src-r76/Games/DeathMatch/Code/HumanPlayer.cpp	So Aug 15 12:01:58 2010
@@ -169,7 +169,7 @@
     // Only human players that are still alive can take damage.
     if (State.StateOfExistance!=StateOfExistance_Alive) return;
 
-    State.Velocity=State.Velocity+scale(VectorT(ImpactDir.x, ImpactDir.y, 0.0), 500.0*Amount);
+    State.Velocity=State.Velocity+scale(VectorT(ImpactDir.x, ImpactDir.y, 0.0), 100.0*Amount);
 
     if (State.Health<=Amount)
     {
@@ -237,6 +237,8 @@
         ModelProxyT("Games/DeathMatch/Models/Players/Sentinel.mdl"),
         ModelProxyT("Games/DeathMatch/Models/Players/Skeleton.mdl"),
         ModelProxyT("Games/DeathMatch/Models/Players/T801.mdl"    ),
+		ModelProxyT("Games/DeathMatch/Models/Players/Jaffa.mdl"   ),
+		ModelProxyT("Games/DeathMatch/Models/Players/USCM.mdl"    ),
         ModelProxyT("Games/DeathMatch/Models/Players/Trinity.mdl" )
     };
 
@@ -258,7 +260,9 @@
         else if (_stricmp((const char*)ConfigData, "Sentinel")==0) State.ModelIndex=3;
         else if (_stricmp((const char*)ConfigData, "Skeleton")==0) State.ModelIndex=4;
         else if (_stricmp((const char*)ConfigData, "T801"    )==0) State.ModelIndex=5;
-        else                                                       State.ModelIndex=6;
+		else if (_stricmp((const char*)ConfigData, "Jaffa"   )==0) State.ModelIndex=6;
+		else if (_stricmp((const char*)ConfigData, "USCM"    )==0) State.ModelIndex=7;
+        else                                                       State.ModelIndex=8;
     }
 
     // player name
@@ -410,30 +414,47 @@
 
                 VectorT             WishVelocity;
                 bool                WishJump=false;
-                const double        VelX    =6000.0*LookupTables::Angle16ToSin[State.Heading];     // 6000 == Client.MoveSpeed
-                const double        VelY    =6000.0*LookupTables::Angle16ToCos[State.Heading];     // 6000 == Client.MoveSpeed
+				char				Runspon=0;
+                const double        VelX    =3000.0*LookupTables::Angle16ToSin[State.Heading];     // 6000 == Client.MoveSpeed
+                const double        VelY    =3000.0*LookupTables::Angle16ToCos[State.Heading];     // 6000 == Client.MoveSpeed
                 const unsigned long Keys    =PlayerCommands[PCNr].Keys;
 
                 if (Keys & PCK_MoveForward ) WishVelocity=             VectorT( VelX,  VelY, 0);
-                if (Keys & PCK_MoveBackward) WishVelocity=WishVelocity+VectorT(-VelX, -VelY, 0);
+                if (Keys & PCK_MoveBackward) 
+				{
+					WishVelocity=WishVelocity+VectorT(-VelX, -VelY, 0);
+					Runspon=3;
+				}
                 if (Keys & PCK_StrafeLeft  ) WishVelocity=WishVelocity+VectorT(-VelY,  VelX, 0);
                 if (Keys & PCK_StrafeRight ) WishVelocity=WishVelocity+VectorT( VelY, -VelX, 0);
 
                 if (Keys & PCK_CenterView  ) { State.Pitch=0; State.Bank=0; }
-                if (Keys & PCK_Jump        ) WishJump=true;
+                if (Keys & PCK_Jump        ) 
+				{
+					WishJump=true;
+					Runspon=2;
+				}
              // if (Keys & PCK_Duck        ) ;
-                if (Keys & PCK_Walk        ) WishVelocity=scale(WishVelocity, 0.5);
+                if (Keys & PCK_Walk        ) 
+				{
+					if (Runspon!=3)
+					{
+						WishVelocity=scale(WishVelocity, 2.0);					//Run
+						if (Runspon==3) Runspon=4;
+						else Runspon=1;
+					}
+				}
 
                 VectorT       WishVelLadder;
                 const double  ViewLadderZ=-LookupTables::Angle16ToSin[State.Pitch];
                 const double  ViewLadderY= LookupTables::Angle16ToCos[State.Pitch];
-                const VectorT ViewLadder =scale(VectorT(ViewLadderY*LookupTables::Angle16ToSin[State.Heading], ViewLadderY*LookupTables::Angle16ToCos[State.Heading], ViewLadderZ), 3800.0);
+                const VectorT ViewLadder =scale(VectorT(ViewLadderY*LookupTables::Angle16ToSin[State.Heading], ViewLadderY*LookupTables::Angle16ToCos[State.Heading], ViewLadderZ), 1900.0);
 
                 // TODO: Also take LATERAL movement into account.
                 // TODO: All this needs a HUGE clean-up! Can probably put a lot of this stuff into Physics::MoveHuman.
                 if (Keys & PCK_MoveForward ) WishVelLadder=WishVelLadder+ViewLadder;
                 if (Keys & PCK_MoveBackward) WishVelLadder=WishVelLadder-ViewLadder;
-                if (Keys & PCK_Walk        ) WishVelLadder=scale(WishVelLadder, 0.5);
+                if (Keys & PCK_Walk        ) WishVelLadder=scale(WishVelLadder, 2.0);
 
                 /*if (Clients[ClientNr].move_noclip)
                 {
@@ -469,8 +490,19 @@
                     XYVel.z=0;
                     double NewSpeed=length(XYVel);
 
-                    if (OldSpeed<=1000.0 && NewSpeed>1000.0) State.ModelSequNr=3;
-                    if (OldSpeed>=1000.0 && NewSpeed<1000.0) State.ModelSequNr=1;
+                    if (OldSpeed<=1000.0 && NewSpeed>1000.0) 
+					{
+						if (Runspon==1) State.ModelSequNr=3;
+						else	if (Runspon==2) State.ModelSequNr=8;
+								else	if (Runspon==3) State.ModelSequNr=77;
+										else	if (Runspon==4) State.ModelSequNr=9;
+												else State.ModelSequNr=4;
+					}
+                    if (OldSpeed>=1000.0 && NewSpeed<1000.0)
+					{
+						if (Runspon==2) State.ModelSequNr=8;
+						else State.ModelSequNr=1;
+					}
                 }
 
                 // GameWorld->ModelAdvanceFrameTime() is called on client side in Draw().
@@ -551,7 +583,7 @@
                             case WEAPON_SLOT_9MMAR       : DrawSequNr=4; break;
                             case WEAPON_SLOT_CROSSBOW    : DrawSequNr=5; break;
                             case WEAPON_SLOT_RPG         : DrawSequNr=5; break;
-                            case WEAPON_SLOT_GAUSS       : DrawSequNr=8; break;
+                            case WEAPON_SLOT_GAUSS       : DrawSequNr=2; break;
                             case WEAPON_SLOT_EGON        : DrawSequNr=9; break;
                             case WEAPON_SLOT_GRENADE     : DrawSequNr=7; break;
                             case WEAPON_SLOT_TRIPMINE    : DrawSequNr=0; break;
@@ -581,7 +613,7 @@
                             case WEAPON_SLOT_9MMAR       : DrawSequNr=4; break;
                             case WEAPON_SLOT_CROSSBOW    : DrawSequNr=5; break;
                             case WEAPON_SLOT_RPG         : DrawSequNr=5; break;
-                            case WEAPON_SLOT_GAUSS       : DrawSequNr=8; break;
+                            case WEAPON_SLOT_GAUSS       : DrawSequNr=2; break;
                             case WEAPON_SLOT_EGON        : DrawSequNr=9; break;
                             case WEAPON_SLOT_GRENADE     : DrawSequNr=7; break;
                             case WEAPON_SLOT_TRIPMINE    : DrawSequNr=0; break;
@@ -754,18 +786,21 @@
                 // Now leave it only after we have come to a complete halt, and the death sequence is over.
                 if (OldOriginZ>=State.Origin.z && fabs(State.Velocity.x)<0.1 && fabs(State.Velocity.y)<0.1 && fabs(State.Velocity.z)<0.1 && OldModelFrameNr==State.ModelFrameNr)
                 {
-                    std::map<std::string, std::string> Props; Props["classname"]="corpse";
+                    if (ThinkingOnServerSide)
+                    {
+                        std::map<std::string, std::string> Props; Props["classname"]="corpse";
 
-                    // Create a new "corpse" entity in the place where we died, or else the model disappears.
-                    unsigned long CorpseID=GameWorld->CreateNewEntity(Props, ServerFrameNr, VectorT());
+                        // Create a new "corpse" entity in the place where we died, or else the model disappears.
+                        unsigned long CorpseID=GameWorld->CreateNewEntity(Props, ServerFrameNr, VectorT());
 
-                    if (CorpseID!=0xFFFFFFFF)
-                    {
-                        BaseEntityT* Corpse=GameWorld->GetBaseEntityByID(CorpseID);
+                        if (CorpseID!=0xFFFFFFFF)
+                        {
+                            BaseEntityT* Corpse=GameWorld->GetBaseEntityByID(CorpseID);
 
-                        Corpse->State=EntityStateT(State.Origin+VectorT(0.0, 0.0, State.Dimensions.Min.z+1728.8), VectorT(), BoundingBox3T<double>(Vector3dT()), State.Heading,
-                                                   0, 0, 0, 0, State.ModelIndex, State.ModelSequNr, State.ModelFrameNr, 0, 0, 0, 0,
-                                                   State.ActiveWeaponSlot, 0, 0.0);
+                            Corpse->State=EntityStateT(State.Origin+VectorT(0.0, 0.0, State.Dimensions.Min.z+1728.8), VectorT(), BoundingBox3T<double>(Vector3dT()), State.Heading,
+                                                       0, 0, 0, 0, State.ModelIndex, State.ModelSequNr, State.ModelFrameNr, 0, 0, 0, 0,
+                                                       State.ActiveWeaponSlot, 0, 0.0);
+                        }
                     }
 
                     State.Velocity.y=State.Heading;
@@ -1041,7 +1076,7 @@
 
         // This is a compromise for the not-so-great code in the constructor:
         // Obtain a pointer to our GUI if we haven't one already (so this is a one-time issue).
-        if (GuiHUD==NULL) GuiHUD=cf::GuiSys::GuiMan->Find("Games/DeathMatch/GUIs/HUD.cgui", true);
+        if (GuiHUD==NULL) GuiHUD=cf::GuiSys::GuiMan->Find("Games/DeathMatch/GUIs/HUD_main.cgui", true);
 
         // Decide whether the GuiHUD should be drawn at all.
         const bool ActivateHUD=State.StateOfExistance==StateOfExistance_Alive || State.StateOfExistance==StateOfExistance_Dead;

