Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1) pridas 2 cvary pod nazvem 'custom_fov' a 'fov_zoom'
- 2) usermsg.cpp
- pridas toto:
- ////////////////////
- Do funkce SetFOV:
- BEGIN_READ(pbuf, iSize);
- int iFOV = READ_BYTE();
- g_Local.iFOV = iFOV;
- if (iFOV == 90)
- {
- g_Local.bScoped = false;
- }
- else if (iFOV > 0)
- {
- g_Local.bScoped = true;
- }
- if (cvar.custom_fov > 0 && !g_Local.bScoped)
- {
- iFOV = cvar.custom_fov;
- return (*pSetFOV)(pszName, iSize, &iFOV);
- }
- else
- {
- iFOV = 90;
- return (*pSetFOV)(pszName, iSize, &iFOV);
- }
- return (*pSetFOV)(pszName, iSize, pbuf);
- A pridas novou funkci pod to
- void CustomFOV()
- {
- static int fov; fov = 90;
- static int fov_old;
- if (cvar.custom_fov != 90 && !g_Local.bScoped)
- {
- fov = cvar.custom_fov;
- }
- else if (!g_Local.bScoped)
- {
- fov = cvar.fov_zoom;
- }
- (*pSetFOV)("SetFOV", 1, &fov);
- fov_old = fov;
- }
- ////////////////////
- 3) do Usermsg.h
- pridas toto:
- ////////////////////
- extern void CustomFOV();
- ////////////////////
- 4) a pak zavolas funkci CustomFOV ve cl_createmove.
- client.cpp
- ve funknci cl_createmove
- ////////////////////
- CustomFOV();
- ////////////////////
- to je vse
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement