Finalized changes
This commit is contained in:
parent
f824452eaf
commit
bb60eb9377
@ -585,6 +585,8 @@ static const std::string list_tf2 = R"(
|
||||
|
||||
"Miscellaneous" [
|
||||
"Miscellaneous Settings"
|
||||
"Remove Cond" [
|
||||
"Remove Cond Exploit"
|
||||
"removecond_master"
|
||||
"removecond_value"
|
||||
"removecond_key"
|
||||
@ -593,6 +595,7 @@ static const std::string list_tf2 = R"(
|
||||
"removecond_bleeding"
|
||||
"removecond_stun"
|
||||
"spycrab"
|
||||
]
|
||||
"Spy Alert" [
|
||||
"Spy Alert Settings"
|
||||
"spyalert_enabled"
|
||||
|
@ -134,6 +134,7 @@ int StartSceneEvent_hooked(IClientEntity* _this, int sceneInfo, int choreoScene,
|
||||
float last_bucket = 0;
|
||||
|
||||
static CatVar tauntslide_moveable(CV_SWITCH, "tauntslide_moveable", "0", "Taunt Slide", "Allows free movement while taunting with movable taunts\nOnly works in tf2\nWIP");
|
||||
static CatVar tauntslide_debug(CV_SWITCH, "tauntslide_debug", "0", "Debug movement", "Allows free movement while taunting with movable taunts\nOnly works in tf2\nWIP");
|
||||
|
||||
void CreateMove() {
|
||||
static bool flswitch = false;
|
||||
@ -145,22 +146,35 @@ void CreateMove() {
|
||||
static bool changed = false;
|
||||
static ConVar *pNoPush = g_ICvar->FindVar("tf_avoidteammates_pushaway");
|
||||
|
||||
|
||||
//Tauntslide needs improvement for movement but it mostly works
|
||||
IF_GAME (IsTF2()) {
|
||||
//Only work if the catvar enables it
|
||||
if (tauntslide_moveable) {
|
||||
//Check to prevent crashing
|
||||
if (CE_GOOD(LOCAL_E)) {
|
||||
//If the local player is taunting
|
||||
if (HasCondition<TFCond_Taunting>(LOCAL_E)) {
|
||||
logging::Info("sLIDDING ");
|
||||
if (tauntslide_debug) {
|
||||
float forward = 0;
|
||||
float side = 0;
|
||||
|
||||
if (g_pUserCmd->buttons & IN_FORWARD) forward -= 450;
|
||||
if (g_pUserCmd->buttons & IN_BACK) forward += 450;
|
||||
if (g_pUserCmd->buttons & IN_MOVELEFT) side -= 450;
|
||||
if (g_pUserCmd->buttons & IN_MOVERIGHT) side += 450;
|
||||
|
||||
g_pUserCmd->forwardmove = forward;
|
||||
g_pUserCmd->sidemove = side;
|
||||
}
|
||||
//Grab Camera angle
|
||||
static QAngle cameraAngle;
|
||||
g_IEngine->GetViewAngles(cameraAngle);
|
||||
|
||||
//Set userAngle = camera angles
|
||||
g_pUserCmd->viewangles.y = cameraAngle[1];
|
||||
//Use silent since we dont want to prevent the player from looking around
|
||||
g_pLocalPlayer->bUseSilentAngles = true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -705,7 +705,6 @@ bool IsEntityVisiblePenetration(CachedEntity* entity, int hb) {
|
||||
|
||||
void RunEnginePrediction(IClientEntity* ent, CUserCmd *ucmd) {
|
||||
if (!ent) return;
|
||||
//if (CE_BAD( ENTITY(ent->entindex()) )) return;
|
||||
|
||||
typedef void(*SetupMoveFn)(IPrediction*, IClientEntity *, CUserCmd *, class IMoveHelper *, CMoveData *);
|
||||
typedef void(*FinishMoveFn)(IPrediction*, IClientEntity *, CUserCmd*, CMoveData*);
|
||||
@ -714,7 +713,10 @@ void RunEnginePrediction(IClientEntity* ent, CUserCmd *ucmd) {
|
||||
SetupMoveFn oSetupMove = (SetupMoveFn)(*(unsigned*)(predictionVtable + 19));
|
||||
FinishMoveFn oFinishMove = (FinishMoveFn)(*(unsigned*)(predictionVtable + 20));
|
||||
|
||||
CMoveData *pMoveData = (CMoveData*)(sharedobj::client->lmap->l_addr + 0x1F69C0C);
|
||||
//CMoveData *pMoveData = (CMoveData*)(sharedobj::client->lmap->l_addr + 0x1F69C0C);
|
||||
//CMoveData movedata {};
|
||||
char* object = new char[165];
|
||||
CMoveData *pMoveData = (CMoveData*)object;
|
||||
|
||||
float frameTime = g_GlobalVars->frametime;
|
||||
float curTime = g_GlobalVars->curtime;
|
||||
@ -736,8 +738,10 @@ void RunEnginePrediction(IClientEntity* ent, CUserCmd *ucmd) {
|
||||
oFinishMove(g_IPrediction, ent, ucmd, pMoveData);
|
||||
g_IGameMovement->FinishTrackPredictionErrors(reinterpret_cast<CBasePlayer*>(ent));
|
||||
|
||||
delete[] object;
|
||||
|
||||
NET_VAR(ent, 4188, CUserCmd*) = nullptr;
|
||||
*g_PredictionRandomSeed = -1;
|
||||
|
||||
g_GlobalVars->frametime = frameTime;
|
||||
g_GlobalVars->curtime = curTime;
|
||||
|
||||
|
Reference in New Issue
Block a user