Raised This Month: $ Target: $400
 0% 

block in water fog


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 04-28-2013 , 10:39   Re: block in water fog
Reply With Quote #1

After trying many things it seems that water fog is in client side and there is no way to block it.
I just need to recreate water entity, it will solve many problems and give me more opportunities and also its gonna be fun.

I have one question, if i have brush entity pev mins maxs right, how to get brush entity higher point?
.Dare Devil. is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-28-2013 , 11:15   Re: block in water fog
Reply With Quote #2

Try this :

Source world.cpp HLSDK :
Spoiler

PHP Code:
enum _:playerTasks ( += 33 )
{
    
TASK_PLR_FIX_LIGHTSTYLE,
}

public 
plugin_init()
{
    
EF_LightStyle(12"m");
}

public 
client_putinserver(id)
{
    
set_task(0.1"Task_Fix_LightStyle"id TASK_PLR_FIX_LIGHTSTYLE);
}

public 
Task_Fix_LightStyleid )
{
    
id %= TASK_PLR_FIX_LIGHTSTYLE;
    if( 
is_user_connected(id) )
    {
        
EF_LightStyle(12"m");
    }

Also, from ian.camarata climb plugin, you can do in client_PreThink :
PHP Code:
    //Prevent drowning
    // waterlevel 0 - not in water
    // waterlevel 1 - feet in water
    // waterlevel 2 - waist in water
    // waterlevel 3 - head in water
    
if( pevidpev_waterlevel ) == set_pevidpev_waterlevel
Would be more correct to set CD_WaterLevel in update_clientdata though.

PHP Code:
enum _:playerTasks ( += 33 )
{
    
TASK_PLR_FIX_LIGHTSTYLE,
}

public 
plugin_init()
{
    
register_forward(FM_UpdateClientData"OnUpdateClientData_Post"true);
    
EF_LightStyle(12"m");
}

public 
client_putinserver(id)
{
    
set_task(0.1"Task_Fix_LightStyle"id TASK_PLR_FIX_LIGHTSTYLE);
}

public 
OnUpdateClientData_Post(entsenweaponscd)
{
    if( 
get_cd(cdCD_WaterLevel) == )
    {
        
set_cd(cdCD_WaterLevel2);
    }
}

public 
Task_Fix_LightStyleid )
{
    
id %= TASK_PLR_FIX_LIGHTSTYLE;
    if( 
is_user_connected(id) )
    {
        
EF_LightStyle(12"m");
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-28-2013 at 11:21.
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:45.


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