GetLocalViewAngles / SetLocalViewAngles индексы

Забаненный
Статус
Оффлайн
Регистрация
3 Окт 2017
Сообщения
172
Реакции[?]
25
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
В общем-то есть такой хуевый класс:
Код:
class IPrediction
{
private:
virtual void UnknownVirtual0() = 0;
virtual void UnknownVirtual1() = 0;
virtual void UnknownVirtual2() = 0;
virtual void UnknownVirtual3() = 0;
virtual void UnknownVirtual4() = 0;
virtual void UnknownVirtual5() = 0;
virtual void UnknownVirtual6() = 0;
virtual void UnknownVirtual7() = 0;
virtual void UnknownVirtual8() = 0;
virtual void UnknownVirtual9() = 0;
virtual void UnknownVirtual10() = 0;
virtual void UnknownVirtual11() = 0;
virtual void UnknownVirtual12() = 0;
virtual void UnknownVirtual13() = 0;
virtual void UnknownVirtual14() = 0;
virtual void UnknownVirtual15() = 0;
virtual void UnknownVirtual16() = 0;
virtual void UnknownVirtual17() = 0;
virtual void UnknownVirtual18() = 0;
virtual void UnknownVirtual19() = 0;
public:
virtual void SetupMove(CBaseEntity* player, CUserCmd* ucmd, IMoveHelper* pHelper, CMoveData* move) = 0; //20
virtual void FinishMove(CBaseEntity* player, CUserCmd* ucmd, CMoveData* move) = 0;
};
Как переписать его под тот который присутствует на github (Source SDK). Тоисть, у меня есть функции GetLocalViewAngles, SetLocalViewAngles. Может быть проблема что при указании других (неверных) индексов, может возникнуть проблема с работоспособностью. Спасибо за помощь.
 
5 ночей на aim_ag_texture2
Эксперт
Статус
Оффлайн
Регистрация
6 Апр 2017
Сообщения
826
Реакции[?]
401
Поинты[?]
11K
разве это не то же самое что и Set/GetViewAngles в IVEngineClient?
 
Забаненный
Статус
Оффлайн
Регистрация
3 Окт 2017
Сообщения
172
Реакции[?]
25
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Начинающий
Статус
Оффлайн
Регистрация
28 Авг 2017
Сообщения
52
Реакции[?]
18
Поинты[?]
1K
Код:
class CMoveData
{
public:
    bool m_bFirstRunOfFunctions : 1;
    bool m_bGameCodeMovedPlayer : 1;
    bool m_bNoAirControl : 1;

    void* m_nPlayerHandle; // edict index on server, client entity handle on client

    int m_nImpulseCommand; // Impulse command issued.
    Vector m_vecViewAngles; // Command view angles (local space)
    Vector m_vecAbsViewAngles; // Command view angles (world space)
    int m_nButtons; // Attack buttons.
    int m_nOldButtons; // From host_client->oldbuttons;
    float m_flForwardMove;
    float m_flSideMove;
    float m_flUpMove;

    float m_flMaxSpeed;
    float m_flClientMaxSpeed;

    // Variables from the player edict (sv_player) or entvars on the client.
    // These are copied in here before calling and copied out after calling.
    Vector m_vecVelocity; // edict::velocity        // Current movement direction.
    Vector m_vecAngles; // edict::angles
    Vector m_vecOldAngles;

    // Output only
    float m_outStepHeight; // how much you climbed this move
    Vector m_outWishVel; // This is where you tried
    Vector m_outJumpVel; // This is your jump velocity

    // Movement constraints    (radius 0 means no constraint)
    Vector m_vecConstraintCenter;
    float m_flConstraintRadius;
    float m_flConstraintWidth;
    float m_flConstraintSpeedFactor;
    bool m_bConstraintPastRadius; ///< If no, do no constraining past Radius.  If yes, cap them to SpeedFactor past radius

    void SetAbsOrigin( const Vector& vec );

    const Vector& GetAbsOrigin() const;

private:
    Vector m_vecAbsOrigin; // edict::origin
};

class CPrediction
{
    // Construction
public:

    virtual ~CPrediction( void ) = 0;//

    virtual void Init( void ) = 0;//
    virtual void Shutdown( void ) = 0;//

public:

    virtual void Update
    (
        int startframe, // World update ( un-modded ) most recently received
        bool validframe, // Is frame data valid
        int incoming_acknowledged, // Last command acknowledged to have been run by server (un-modded)
        int outgoing_command // Last command (most recent) sent to server (un-modded)
    );//

    virtual void PreEntityPacketReceived( int commands_acknowledged, int current_world_update_packet );//
    virtual void PostEntityPacketReceived( void );//5
    virtual void PostNetworkDataReceived( int commands_acknowledged );//

    virtual void OnReceivedUncompressedPacket( void );//

    // The engine needs to be able to access a few predicted values
    virtual void GetViewOrigin( Vector& org );//
    virtual void SetViewOrigin( Vector& org );//
    virtual void GetViewAngles( Vector& ang );//10
    virtual void SetViewAngles( Vector& ang );//

    virtual void GetLocalViewAngles( Vector& ang );//
    virtual void SetLocalViewAngles( Vector& ang );//

    virtual bool InPrediction( void ) const;//14
    virtual bool IsFirstTimePredicted( void ) const;//

    virtual int GetLastAcknowledgedCommandNumber( void ) const;//

#if !defined( NO_ENTITY_PREDICTION )
    virtual int GetIncomingPacketNumber( void ) const;//
#endif

    virtual void CheckMovingGround( CBaseEntity* player, double frametime );//
    virtual void RunCommand( CBaseEntity* player, CInput::CUserCmd* ucmd, IMoveHelper* moveHelper );//

    virtual void SetupMove( CBaseEntity* player, CInput::CUserCmd* ucmd, IMoveHelper* pHelper, CMoveData* move );//20
    virtual void FinishMove( CBaseEntity* player, CInput::CUserCmd* ucmd, CMoveData* move );//
    virtual void SetIdealPitch( int nSlot, CBaseEntity* player, const Vector& origin, const Vector& angles, const Vector& viewheight );//

    virtual void CheckError( int nSlot, CBaseEntity* player, int commands_acknowledged );//

    // Called before and after any movement processing
    /*void            StartCommand( C_BasePlayer *player, CUserCmd *cmd );
    void            FinishCommand( C_BasePlayer *player );

    // Helpers to call pre and post think for player, and to call think if a think function is set
    void            RunPreThink( C_BasePlayer *player );
    void            RunThink (C_BasePlayer *ent, double frametime );
    void            RunPostThink( C_BasePlayer *player );*/

public:
    virtual void _Update
    (
        int nSlot,
        bool received_new_world_update,
        bool validframe, // Is frame data valid
        int incoming_acknowledged, // Last command acknowledged to have been run by server (un-modded)
        int outgoing_command // Last command (most recent) sent to server (un-modded)
    );

    // Actually does the prediction work, returns false if an error occurred
    bool PerformPrediction( int nSlot, CBaseEntity* localPlayer, bool received_new_world_update, int incoming_acknowledged, int outgoing_command );

    void ShiftIntermediateDataForward( int nSlot, int slots_to_remove, int previous_last_slot );

    void RestoreEntityToPredictedFrame( int nSlot, int predicted_frame );

    int ComputeFirstCommandToExecute( int nSlot, bool received_new_world_update, int incoming_acknowledged, int outgoing_command );

    void DumpEntity( CBaseEntity* ent, int commands_acknowledged );

    void ShutdownPredictables( void );

    void ReinitPredictables( void );

    void RemoveStalePredictedEntities( int nSlot, int last_command_packet );

    void RestoreOriginalEntityState( int nSlot );

    void RunSimulation( int current_command, float curtime, CInput::CUserCmd* cmd, CBaseEntity* localPlayer );

    void Untouch( int nSlot );

    void StorePredictionResults( int nSlot, int predicted_frame );

    bool ShouldDumpEntity( CBaseEntity* ent );

    void SmoothViewOnMovingPlatform( CBaseEntity* pPlayer, Vector& offset );

    void ResetSimulationTick();

    void ShowPredictionListEntry( int listRow, int showlist, CBaseEntity* ent, int& totalsize, int& totalsize_intermediate );

    void FinishPredictionList( int listRow, int showlist, int totalsize, int totalsize_intermediate );

    void CheckPredictConvar();

#if !defined( NO_ENTITY_PREDICTION )

#endif
};
 
Забаненный
Статус
Оффлайн
Регистрация
3 Окт 2017
Сообщения
172
Реакции[?]
25
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
class CMoveData
{
public:
    bool m_bFirstRunOfFunctions : 1;
    bool m_bGameCodeMovedPlayer : 1;
    bool m_bNoAirControl : 1;

    void* m_nPlayerHandle; // edict index on server, client entity handle on client

    int m_nImpulseCommand; // Impulse command issued.
    Vector m_vecViewAngles; // Command view angles (local space)
    Vector m_vecAbsViewAngles; // Command view angles (world space)
    int m_nButtons; // Attack buttons.
    int m_nOldButtons; // From host_client->oldbuttons;
    float m_flForwardMove;
    float m_flSideMove;
    float m_flUpMove;

    float m_flMaxSpeed;
    float m_flClientMaxSpeed;

    // Variables from the player edict (sv_player) or entvars on the client.
    // These are copied in here before calling and copied out after calling.
    Vector m_vecVelocity; // edict::velocity        // Current movement direction.
    Vector m_vecAngles; // edict::angles
    Vector m_vecOldAngles;

    // Output only
    float m_outStepHeight; // how much you climbed this move
    Vector m_outWishVel; // This is where you tried
    Vector m_outJumpVel; // This is your jump velocity

    // Movement constraints    (radius 0 means no constraint)
    Vector m_vecConstraintCenter;
    float m_flConstraintRadius;
    float m_flConstraintWidth;
    float m_flConstraintSpeedFactor;
    bool m_bConstraintPastRadius; ///< If no, do no constraining past Radius.  If yes, cap them to SpeedFactor past radius

    void SetAbsOrigin( const Vector& vec );

    const Vector& GetAbsOrigin() const;

private:
    Vector m_vecAbsOrigin; // edict::origin
};

class CPrediction
{
    // Construction
public:

    virtual ~CPrediction( void ) = 0;//

    virtual void Init( void ) = 0;//
    virtual void Shutdown( void ) = 0;//

public:

    virtual void Update
    (
        int startframe, // World update ( un-modded ) most recently received
        bool validframe, // Is frame data valid
        int incoming_acknowledged, // Last command acknowledged to have been run by server (un-modded)
        int outgoing_command // Last command (most recent) sent to server (un-modded)
    );//

    virtual void PreEntityPacketReceived( int commands_acknowledged, int current_world_update_packet );//
    virtual void PostEntityPacketReceived( void );//5
    virtual void PostNetworkDataReceived( int commands_acknowledged );//

    virtual void OnReceivedUncompressedPacket( void );//

    // The engine needs to be able to access a few predicted values
    virtual void GetViewOrigin( Vector& org );//
    virtual void SetViewOrigin( Vector& org );//
    virtual void GetViewAngles( Vector& ang );//10
    virtual void SetViewAngles( Vector& ang );//

    virtual void GetLocalViewAngles( Vector& ang );//
    virtual void SetLocalViewAngles( Vector& ang );//

    virtual bool InPrediction( void ) const;//14
    virtual bool IsFirstTimePredicted( void ) const;//

    virtual int GetLastAcknowledgedCommandNumber( void ) const;//

#if !defined( NO_ENTITY_PREDICTION )
    virtual int GetIncomingPacketNumber( void ) const;//
#endif

    virtual void CheckMovingGround( CBaseEntity* player, double frametime );//
    virtual void RunCommand( CBaseEntity* player, CInput::CUserCmd* ucmd, IMoveHelper* moveHelper );//

    virtual void SetupMove( CBaseEntity* player, CInput::CUserCmd* ucmd, IMoveHelper* pHelper, CMoveData* move );//20
    virtual void FinishMove( CBaseEntity* player, CInput::CUserCmd* ucmd, CMoveData* move );//
    virtual void SetIdealPitch( int nSlot, CBaseEntity* player, const Vector& origin, const Vector& angles, const Vector& viewheight );//

    virtual void CheckError( int nSlot, CBaseEntity* player, int commands_acknowledged );//

    // Called before and after any movement processing
    /*void            StartCommand( C_BasePlayer *player, CUserCmd *cmd );
    void            FinishCommand( C_BasePlayer *player );

    // Helpers to call pre and post think for player, and to call think if a think function is set
    void            RunPreThink( C_BasePlayer *player );
    void            RunThink (C_BasePlayer *ent, double frametime );
    void            RunPostThink( C_BasePlayer *player );*/

public:
    virtual void _Update
    (
        int nSlot,
        bool received_new_world_update,
        bool validframe, // Is frame data valid
        int incoming_acknowledged, // Last command acknowledged to have been run by server (un-modded)
        int outgoing_command // Last command (most recent) sent to server (un-modded)
    );

    // Actually does the prediction work, returns false if an error occurred
    bool PerformPrediction( int nSlot, CBaseEntity* localPlayer, bool received_new_world_update, int incoming_acknowledged, int outgoing_command );

    void ShiftIntermediateDataForward( int nSlot, int slots_to_remove, int previous_last_slot );

    void RestoreEntityToPredictedFrame( int nSlot, int predicted_frame );

    int ComputeFirstCommandToExecute( int nSlot, bool received_new_world_update, int incoming_acknowledged, int outgoing_command );

    void DumpEntity( CBaseEntity* ent, int commands_acknowledged );

    void ShutdownPredictables( void );

    void ReinitPredictables( void );

    void RemoveStalePredictedEntities( int nSlot, int last_command_packet );

    void RestoreOriginalEntityState( int nSlot );

    void RunSimulation( int current_command, float curtime, CInput::CUserCmd* cmd, CBaseEntity* localPlayer );

    void Untouch( int nSlot );

    void StorePredictionResults( int nSlot, int predicted_frame );

    bool ShouldDumpEntity( CBaseEntity* ent );

    void SmoothViewOnMovingPlatform( CBaseEntity* pPlayer, Vector& offset );

    void ResetSimulationTick();

    void ShowPredictionListEntry( int listRow, int showlist, CBaseEntity* ent, int& totalsize, int& totalsize_intermediate );

    void FinishPredictionList( int listRow, int showlist, int totalsize, int totalsize_intermediate );

    void CheckPredictConvar();

#if !defined( NO_ENTITY_PREDICTION )

#endif
};
Очень известный и хороший человек сказал что С+Р не пойдет
 
Начинающий
Статус
Оффлайн
Регистрация
28 Авг 2017
Сообщения
52
Реакции[?]
18
Поинты[?]
1K
Очень известный и хороший человек сказал что С+Р не пойдет
Причём тут c+p? Я тебе скинул корректный класс с функциями которые тебе нужны(можешь отсчитать индексы, если тебе нужны только GetLocalViewAngles и SetLocalViewAngles).
 
Забаненный
Статус
Оффлайн
Регистрация
3 Дек 2016
Сообщения
321
Реакции[?]
176
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу