Zh/CBaseEntity: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 3: Line 3:
所有实体基于的类。
所有实体基于的类。


== 键值 ==
{{seealso|{{L|Generic Keyvalues, Inputs and Outputs}}}}
{{KV BaseEntity}}
 
== 输入 ==
{{I BaseEntity:zh-cn}}
 
== 输出 ==
{{O BaseEntity:zh-cn|l4d=1}}


= 编程相关 =
= 编程相关 =

Latest revision as of 11:45, 26 September 2024

English (en)中文 (zh)Translate (Translate)

所有实体基于的类。

编程相关

要获得一个实体的 classname,使用

entity->edict()->GetClassName();

断言(Asserts)

客户端(Client)

问题:

// 找不到模型
Assert( !"Model could not be found, index is -1" );

解决方案:

  • 检查你的模型名称三次。
  • 在服务器和客户端上都预缓存你的模型。