AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Rotato Player Camera (https://forums.alliedmods.net/showthread.php?t=156627)

kotinha 05-09-2011 15:02

Rotato Player Camera
 
How can I rotate a camera? I've seen a ConnorMcLeod's plugin but I don't understand it lol
The plugin: Migraine

Can someone explain me the plugin or just how to rotate the camera?

fireattack 05-09-2011 15:40

Re: Rotato Player Camera
 
PHP Code:

#define SetUserReversed(%1)        g_bMigraineux |= 1<<(%1 & 31)
#define ClearUserReversed(%1)        g_bMigraineux &= ~( 1<<(%1 & 31) )
#define HasUserMigraine(%1)        g_bMigraineux &  1<<(%1 & 31) 

Check the code related to that defines.

kotinha 05-09-2011 16:09

Re: Rotato Player Camera
 
That is what I don't understand lol
What is |= ? And the 1<<(%1 & 31) ?

Sylwester 05-09-2011 16:15

Re: Rotato Player Camera
 
That has nothing to do with rotating camera. Thos 3 defines are used to flag players to see whether the effect is enabled or disabled for them.

What you should look at is probably
PHP Code:

set_pev(idpev_punchanglevecPunchAngle


fysiks 05-09-2011 20:34

Re: Rotato Player Camera
 
Quote:

Originally Posted by kotinha (Post 1466426)
That is what I don't understand lol
What is |= ? And the 1<<(%1 & 31) ?

You really don't need to understand them because you can just use them like functions as they are.

Anyways,

Code:

variable |= anothervariable
is the same as

Code:

variable = variable | anothervariable
same as +=, -=, *=, and /=.


All times are GMT -4. The time now is 04:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.