origin, angles and touch optimisation
I would like to know why commented part doesnt work, and why uncommented works, cause i see no reason not to work.
PHP Code:
|
Re: origin and angles
try
new Float:origin[3] = g_SpawnVecs[randspawn]; |
Re: origin and angles
Commented : Because you need to provide a constant value. How the compiler could know the value at the compilation ? Not possible that's why you can't.
Uncommented : Because origin and g_SpawnVecs have the same size and you are allowed to do that. |
Re: origin and angles
Ok, tnx. I have 2 more q, is sound emitted with client_cmd( id , spk...) heard by everyone or just that player, and is it ok to remove is_valid_ent check if i change
PHP Code:
PHP Code:
|
Re: origin, angles and touch optimisation
you can remove is_valid_ent(id) check
|
Re: origin, angles and touch optimisation
Quote:
Better to use register_touch() when you can ( called only on the classname provided, and the check is done internally so more efficient ). About the check, the entity should be always checked (quad). Id should be checked ( or not ) depending your need. (alive, connected, etc. ) |
Re: origin, angles and touch optimisation
Tnx once again.
|
Re: origin, angles and touch optimisation
What would be better to do if i have plugin already done in fakemeta, to handle touch in fakemeta with check
PHP Code:
because i dont see fakemeta function for register_touch |
Re: origin, angles and touch optimisation
Think, do you think that a forward called for all entities and checking classname manually is more efficient than a forward called only for the entites with the classname provided and so the check is done internally ?
|
Re: origin, angles and touch optimisation
Yea, i thought so too, but i dont know how much another included module raises resource consumption so i asked :D
|
| All times are GMT -4. The time now is 04:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.