Raised This Month: $52 Target: $400
 13% 

Solved Model overlay


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mixtaz
Junior Member
Join Date: Sep 2017
Old 08-11-2020 , 02:42   Model overlay
Reply With Quote #1

Hello, I'm running biohazard server by Cheap Suit.

He uses this weird method of applying models into player:

PHP Code:
if(!pev_valid(g_modelent[index]))
    {
        static 
ent
        ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
        if(
pev_valid(ent))
        {
            
engfunc(EngFunc_SetModelentDEFAULT_PMODEL)
            
set_pev(entpev_classnameMODEL_CLASSNAME)
            
set_pev(entpev_movetypeMOVETYPE_FOLLOW)
            
set_pev(entpev_aimentindex)
            
set_pev(entpev_ownerindex)
                
            
g_modelent[index] = ent
        
}
    }
    else
    {
        
engfunc(EngFunc_SetModelg_modelent[index], DEFAULT_PMODEL)
        
fm_set_entity_visibility(g_modelent[index], 1)
    } 
Nothing wrong with that, works fine and even overrides cl_minmodels 1 command.

However combined with frostnade plugin by Avalanche, when zombie gets frozen it gets both zombie and human model. I've done some debugging sessions and what appears to be problem is "set_user_rendering" function. I've modified the code a bit following Mercylezz tutorial, and it worked but when zombie was frozen, it no longer was glowing when hit.

Here is my edited version of frostnades, perhaps someone knows how to fix this
Attached Files
File Type: sma Get Plugin or Get Source (bio_frost.sma - 25 views - 42.4 KB)

Last edited by Mixtaz; 10-28-2020 at 07:20.
Mixtaz is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Upplands Väsby, Sweden
Old 08-12-2020 , 18:11   Re: Model overlay
Reply With Quote #2

I'm pretty much guessing here.
You probably have to set the rendering on the model dummy entity instead of the player.
To get the entity, loop through them by classname "player_model" and compare pev_owner to the player id.
If there's no hit, use the player as the target entity. (If that is a possibility, I don't know)
__________________

Last edited by Black Rose; 08-12-2020 at 18:12.
Black Rose is offline
Mixtaz
Junior Member
Join Date: Sep 2017
Old 10-28-2020 , 07:18   Re: Model overlay
Reply With Quote #3

All I had to do was to made native that returns g_modelent and override the freeze method with it instead of player id. Good guess tho, thanks.
Mixtaz is offline
Reply


Thread Tools
Display Modes

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 05:53.


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