Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Character floor effect

Newbie Spellweaver
Joined
Jan 9, 2018
Messages
30
Reaction score
24
Character floor effect



Code:
[COLOR=#7F7F7F]#define WorldTime                *(float*)0x005EF5A1C[/COLOR]
[COLOR=#7F7F7F]#define EnableAlphaBlend                    ((void(__cdecl*)()) 0x636070)[/COLOR]
[COLOR=#7F7F7F]#define DisableAlphaBlend                ((void(__cdecl*)()) 0x00635F50)[/COLOR]
[COLOR=#7F7F7F]#define RenderTerrainAlphaBitmap                         ((void(__cdecl*)(int Texture,float xf,float yf,float SizeX,float SizeY,vec3_t Light,float Rotation,float Alpha,float Height, char a10)) 0x005DAD80)[/COLOR]

[COLOR=#7F7F7F]void __cdecl RenderCharacter(ObjectPreview *a4, ObjectModel *a5, int Select)[/COLOR]
[COLOR=#7F7F7F]{[/COLOR]
[COLOR=#7F7F7F]    vec3_t vLight;[/COLOR]
[COLOR=#7F7F7F]    Vector(1.0f, 1.0f, 1.f, vLight);[/COLOR]
[COLOR=#7F7F7F]    float fLumi = sinf(WorldTime * 0.0015f) * 0.3f + 0.5f;[/COLOR]
[COLOR=#7F7F7F]    Vector(fLumi * vLight[0], fLumi * vLight[1], fLumi * vLight[2], vLight);[/COLOR]
[COLOR=#7F7F7F]    EnableAlphaBlend();[/COLOR]
[COLOR=#7F7F7F]    RenderTerrainAlphaBitmap(32280, a4->m_Model.VecPos.X, a4->m_Model.VecPos.Y, 5.8f, 5.8f, vLight, WorldTime * 0.11f, 1.0, 5, 1);[/COLOR]
[COLOR=#7F7F7F]    RenderTerrainAlphaBitmap(32280, a4->m_Model.VecPos.X, a4->m_Model.VecPos.Y, 3.8f, 3.8f, vLight, -WorldTime * 0.01f, 1.0, 5, 1);[/COLOR]
[COLOR=#7F7F7F]    DisableAlphaBlend();[/COLOR]
[COLOR=#7F7F7F]}[/COLOR]

[COLOR=#7F7F7F]SetCompleteHook(0xE8,0x404570+0x30D,&RenderCharacter);[/COLOR]
[COLOR=#7F7F7F]SetCompleteHook(0xE8,0x48E120+0x44C,&RenderCharacter);[/COLOR]
[COLOR=#7F7F7F]SetCompleteHook(0xE8,0x57D260+0x29F,&RenderCharacter);[/COLOR]
[COLOR=#7F7F7F]SetCompleteHook(0xE8,0x57D260+0x2B3,&RenderCharacter);[/COLOR]
 
Newbie Spellweaver
Joined
Dec 1, 2010
Messages
67
Reaction score
5
CustomMoveEffect.h
#pragma once
#define WorldTime *(float*)0x005EF5A1C
#define EnableAlphaBlend ((void(__cdecl*)()) 0x636070)
#define DisableAlphaBlend ((void(__cdecl*)()) 0x00635F50)
#define RenderTerrainAlphaBitmap ((void(__cdecl*)(int Texture,float xf,float yf,float SizeX,float SizeY,vec3_t Light,float Rotation,float Alpha,float Height, char a10)) 0x005DAD80)

class CustomMoveEffect
{
public:
CustomMoveEffect(void);
~CustomMoveEffect(void);
void Init();
};

extern CustomMoveEffect gMoveEffect;

CustomMoveEffect.cpp
#include "StdAfx.h"
#include "CustomMoveEffect.h"
#include "User.h"
#include "Util.h"

CustomMoveEffect gMoveEffect;
CustomMoveEffect::CustomMoveEffect(void)
{
}


CustomMoveEffect::~CustomMoveEffect(void)
{
}


void __cdecl RenderCharacter(ObjectPreview *a4, ObjectModel *a5, int Select)
{
vec3_t vLight;
Vector(1.0f, 1.0f, 1.f, vLight);
float fLumi = sinf(WorldTime * 0.0015f) * 0.3f + 0.5f;
Vector(fLumi * vLight[0], fLumi * vLight[1], fLumi * vLight[2], vLight);
EnableAlphaBlend();
RenderTerrainAlphaBitmap(32280, a4->m_Model.VecPos.X, a4->m_Model.VecPos.Y, 5.8f, 5.8f, vLight, WorldTime * 0.11f, 1.0, 5, 1);
RenderTerrainAlphaBitmap(32280, a4->m_Model.VecPos.X, a4->m_Model.VecPos.Y, 3.8f, 3.8f, vLight, -WorldTime * 0.01f, 1.0, 5, 1);
DisableAlphaBlend();
}

void CustomMoveEffect::Init()
{
SetCompleteHook(0xE8,0x404570+0x30D,&RenderCharacter);
SetCompleteHook(0xE8,0x48E120+0x44C,&RenderCharacter);
SetCompleteHook(0xE8,0x57D260+0x29F,&RenderCharacter);
SetCompleteHook(0xE8,0x57D260+0x2B3,&RenderCharacter);
}

Main.cpp
gMoveEffect.Init()



Bug:

Swiety - Character floor effect - RaGEZONE Forums

Swiety - Character floor effect - RaGEZONE Forums
 
Back
Top