{"id":473846,"date":"2025-09-03T15:01:34","date_gmt":"2025-09-03T15:01:34","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=473846"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=473846","title":{"rendered":"<span>\u0411\u043e\u0440\u0435\u043c\u0441\u044f \u0441 \u0445\u0435\u0434\u043a\u0440\u0430\u0431\u0430\u043c\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 Source SDK<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>GameDev \u0442\u0435\u0440\u043d\u0438\u0441\u0442 \u0438 \u043d\u0435\u0438\u0441\u043f\u043e\u0432\u0435\u0434\u0438\u043c. \u041a\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043e\u043d \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f \u043a\u0440\u043e\u0432\u044c\u044e \u0438 \u043f\u043e\u0442\u043e\u043c, \u0441\u0440\u0430\u0436\u0430\u044f\u0441\u044c \u0441 \u0442\u0432\u0430\u0440\u044f\u043c\u0438, \u0442\u044c\u043c\u043e\u0439 \u043f\u043e\u0440\u043e\u0436\u0434\u0451\u043d\u043d\u044b\u043c\u0438: \u0431\u0430\u0440\u043d\u0430\u043a\u043b\u044b, \u043f\u0438\u044f\u0432\u043a\u0438, \u043c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u044b\u0435 \u043b\u044c\u0432\u044b. \u0418 \u044d\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0441\u043a\u0430\u0437\u043e\u0447\u043a\u0430, \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043c\u0430\u0437\u043e\u0447\u043a\u0430. \u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0441\u0442\u0435\u0440\u0435\u0433\u0430\u0442\u044c\u0441\u044f \u0436\u0443\u043a\u043e\u0432 \u0445\u0435\u0434\u043a\u0440\u0430\u0431\u043e\u0432. \u0414\u0430, \u044d\u0442\u043e \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u0431\u0430\u0433\u0438 \u0432 \u043a\u043e\u0434\u0435. \u0415\u0441\u043b\u0438 \u0438\u0445 \u0432\u043e\u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0443\u0431\u0438\u0442\u044c \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439, \u0442\u043e \u0432\u0430\u0448\u0430 \u0443\u0447\u0430\u0441\u0442\u044c \u2014 \u0441\u0442\u0430\u0442\u044c \u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u0430\u0434\u0430\u0432\u0440\u043e\u043c. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u043f\u043e\u0431\u044b\u0432\u0430\u0442\u044c \u0432 \u0440\u043e\u043b\u0438 \u0413\u043e\u0440\u0434\u043e\u043d\u0430 \u0424\u0440\u0438\u043c\u0435\u043d\u0430, \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u043d\u0435\u0434\u0440\u044b Source SDK \u0438 \u043f\u043e\u0431\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u0441 \u0445\u0435\u0434\u043a\u0440\u0430\u0431\u0430\u043c\u0438. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0436\u0435 \u0432\u044b\u0441\u0442\u0443\u043f\u0438\u0442 PVS-Studio.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/41c\/718\/020\/41c7180203a4e200e761b6dad54ee261.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/41c\/718\/020\/41c7180203a4e200e761b6dad54ee261.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/41c\/718\/020\/41c7180203a4e200e761b6dad54ee261.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u041e \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u044c \u043c\u0435\u0436\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0432\u0440\u0430\u0442\u0430, \u043d\u0430\u0448 \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0413\u043e\u0440\u0434\u043e\u043d, \u0438\u0437\u0443\u0447\u0438\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u043f\u0440\u0430\u0432\u043a\u0443 \u043e \u043c\u0438\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c.<\/p>\n<p><a href=\"https:\/\/developer.valvesoftware.com\/wiki\/Source_SDK_Base_2013\" rel=\"noopener noreferrer nofollow\">Source SDK<\/a> \u2014 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043c\u043e\u0434\u043e\u0432, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0434\u043b\u044f \u0438\u0433\u0440 \u043d\u0430 \u0434\u0432\u0438\u0436\u043a\u0435 <a href=\"https:\/\/halflife.fandom.com\/ru\/wiki\/Source\" rel=\"noopener noreferrer nofollow\">Source<\/a> Engine, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0435\u0439 Valve. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u044b, \u043c\u043e\u0434\u044b, \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043b\u0438\u0446\u0430 NPC \u0438\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.<\/p>\n<p>\u041c\u044b \u043f\u043e\u0438\u0441\u0442\u0438\u043d\u0435 \u0440\u0430\u0434\u044b \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0441 \u043d\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0229\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>. \u041d\u043e \u043f\u0440\u043e\u0435\u043a\u0442 Source SDK \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435, \u0440\u0430\u0441\u0442\u0451\u0442 \u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0438 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/0010\/\" rel=\"noopener noreferrer nofollow\">PVS-Studio<\/a>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0432\u0430\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0438\u0443\u0440\u043e\u0447\u0435\u043d\u0430 \u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0434\u0432\u0438\u0436\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0435\u043c\u0430\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439: \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0433\u0440\u044b \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c 4 \u0413\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 VGUI \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a 4K. \u041d\u043e \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043a\u0440\u0443\u043f\u043d\u044b\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432 Source SDK \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u0434 Team Fortress 2. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043c\u043e\u0434\u0434\u0435\u0440\u0430\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c TF2 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u044b\u0445 \u0438\u0433\u0440 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 TF2.<\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0441\u044f \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>. \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0438\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439. \u041a\u043e\u043c\u043c\u0438\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b \u0441\u043e\u0431\u0440\u0430\u043d \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u2014 <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/tree\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\" rel=\"noopener noreferrer nofollow\">68c8b82<\/a>.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u044e \u0432\u043e\u0448\u043b\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0440\u043e\u0432\u043d\u044f High (\u0435\u0441\u0442\u044c \u0435\u0449\u0451 Medium \u0438 Low).<\/p>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/h3>\n<h3>\u041e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438<\/h3>\n<h4>\u0412\u044b\u0445\u043e\u0434 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/h4>\n<pre><code class=\"cpp\">class DVariant {   ....   union   {     ....     float m_Vector[3];     ....   };   .... };  \/\/ This is passed into RecvProxy functions. class CRecvProxyData { public:   ....   DVariant m_Value; \/\/ The value given to you to store.   .... };  void RecvProxy_QuaternionToQuaternion( const CRecvProxyData *pData,  void *pStruct, void *pOut ) {   const float *v = pData-&gt;m_Value.m_Vector;      Assert( IsFinite( v[0] ) &amp;&amp; IsFinite( v[1] ) &amp;&amp;           IsFinite( v[2] ) &amp;&amp; IsFinite( v[3] ) );   ((float*)pOut)[0] = v[0];   ((float*)pOut)[1] = v[1];   ((float*)pOut)[2] = v[2];   ((float*)pOut)[3] = v[3]; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v557\/\" rel=\"noopener noreferrer nofollow\">V557<\/a> Array overrun is possible. The &#8216;3&#8217; index is pointing beyond array bound. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/public\/dt_recv.cpp#L369\" rel=\"noopener noreferrer nofollow\">dt_recv.cpp<\/a> 369, 373<\/p>\n<p>\u041f\u043e\u043b\u0435 <code>m_Value<\/code> \u0442\u0438\u043f\u0430 <code>DVariant<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f \u043c\u0430\u0441\u0441\u0438\u0432 <code>m_Vector<\/code> \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0438\u0437 3 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0412 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>RecvProxy_QuaternionToQuaternion<\/code> \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 4-\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0432\u0441\u0451. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044f <code>m_Vector<\/code> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/public\/dt_common.h#L191-L195\" rel=\"noopener noreferrer nofollow\">\u0445\u0438\u0442\u0440\u0435\u0435<\/a>:<\/p>\n<pre><code class=\"cpp\">union {   .... #if 0 \/\/ We can't ship this since it changes the size of DTVariant        \/\/ to be 20 bytes instead of 16 and that breaks MODs!!!   float m_Vector[4]; #else   float m_Vector[3]; #endif   .... }; <\/code><\/pre>\n<p>\u0421\u0443\u0434\u044f \u0438\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f, \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0445\u043e\u0442\u0435\u043b\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0434\u043e <code>4<\/code>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0432\u0435\u0441\u044c \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u0434. \u0421\u043f\u0443\u0441\u0442\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0441\u043e\u0437\u043d\u0430\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043b\u043e\u043c\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u043c\u043e\u0434\u0430\u043c\u0438, \u0438 \u043e\u0442\u043a\u0430\u0442\u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u043a\u0438. \u041d\u043e, \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u0435\u0441\u0442\u0430\u0445.<\/p>\n<h4>\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/h4>\n<pre><code class=\"cpp\">class CCamoMaterialProxy : public CEntityMaterialProxy { public:   CCamoMaterialProxy();   virtual ~CCamoMaterialProxy();   .... private:   ....   void GenerateRandomPointsInNormalizedCube( void );   .... private:   ....   Vector *m_pointsInNormalizedBox; \/\/ [m_CamoPatternNumColors]   .... };  void CCamoMaterialProxy::GenerateRandomPointsInNormalizedCube( void ) {   m_pointsInNormalizedBox = new Vector[m_CamoPatternNumColors];   .... }  CCamoMaterialProxy::~CCamoMaterialProxy() {   ....   delete m_pointsInNormalizedBox; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v611\/\" rel=\"noopener noreferrer nofollow\">V611<\/a> The memory was allocated using the &#8216;operator new[]&#8217; but was released using the &#8216;operator delete&#8217;. The &#8216;delete[] m_pointsInNormalizedBox;&#8217; statement should be used instead. Check lines: 164, 561. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/game\/client\/camomaterialproxy.cpp#L164\" rel=\"noopener noreferrer nofollow\">camomaterialproxy.cpp<\/a> 164<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 <code>CCamoMaterialProxy<\/code> \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <code>new[]<\/code> \u0438 \u0437\u0430\u0442\u0435\u043c \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <code>delete<\/code>. \u041f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 <a href=\"https:\/\/timsong-cpp.github.io\/cppwp\/n4950\/expr.delete#2\" rel=\"noopener noreferrer nofollow\">\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e<\/a>. \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <code>delete[]<\/code>, \u043b\u0443\u0447\u0448\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0430\u0448\u0435\u0439 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0973\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0451\u0439<\/a>.<\/p>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">CCamoMaterialProxy::~CCamoMaterialProxy() {   ....   delete[] m_pointsInNormalizedBox; } <\/code><\/pre>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/h4>\n<pre><code class=\"cpp\">KeyValues *KeyValues::FindKey(const char *keyName, bool bCreate) {   \/\/ return the current key if a NULL subkey is asked for   if (!keyName || !keyName[0]) \/\/ &lt;=     return this;    \/\/ look for '\/' characters deliminating sub fields   char szBuf[256] = { 0 };   const char *subStr = strchr(keyName, '\/');   const char *searchStr = keyName;               \/\/ pull out the substring if it exists   if (subStr)   {     int size = Min( (int)(subStr - keyName + 1),    (int)V_ARRAYSIZE( szBuf ) );     V_strncpy( szBuf, keyName, size );     ....   }   .... }  void LoadCmdLineFromFile( int &amp;argc, char **&amp;argv,                            const char *keyname,                           const char *appname ) {   ....   if ( kv-&gt;LoadFromFile( g_pFileSystem, filename ) )   {     \/\/ Load the commandline arguments for this app     KeyValues  *appKey  = kv-&gt;FindKey( keyname );     ....   }   .... }  int RunVVis( int argc, char **argv ) {   char portalfile[1024];   char source[1024];   char mapFile[1024];   double start, end;   ....   LoadCmdLineFromFile( argc, argv, source, \"vvis\" );   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v614\/\" rel=\"noopener noreferrer nofollow\">V614<\/a> [CERT-EXP53-CPP] Uninitialized buffer &#8216;source&#8217; used. Consider checking the third actual argument of the &#8216;LoadCmdLineFromFile&#8217; function. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/utils\/vvis\/vvis.cpp#L1095C2-L1095C52\" rel=\"noopener noreferrer nofollow\">vvis.cpp<\/a> 1095<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>source<\/code>, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c. \u041f\u0440\u043e\u0439\u0434\u0451\u043c\u0441\u044f \u043f\u043e \u043a\u043e\u0434\u0443 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 <code>source<\/code> \u0442\u0438\u043f\u0430 <code>char[1024]<\/code> \u0431\u0435\u0437 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0432 \u044f\u0447\u0435\u0439\u043a\u0430\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u0430\u043b\u0435\u0435 <code>source<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/public\/loadcmdline.cpp#L75\" rel=\"noopener noreferrer nofollow\"><code>LoadCmdLineFromFile<\/code><\/a>, \u0430 \u0442\u0430 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0435\u0433\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/tier1\/KeyValues.cpp#L987\" rel=\"noopener noreferrer nofollow\"><code>FindKey<\/code><\/a>. \u0418 \u0443\u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0447\u0442\u0451\u043d, \u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e.<\/p>\n<h3>\u041d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043d\u043e \u0444\u0430\u043a\u0442<\/h3>\n<h4>Same, same but different<\/h4>\n<pre><code class=\"cpp\">class CBaseCombatWeapon : public BASECOMBATWEAPON_DERIVED_FROM { public:   ....   virtual bool CanHolster( void ) const { return TRUE; };   .... };  class CWeaponAR2 : public CHL2MPMachineGun { public:   ....   bool CanHolster( void );   .... };  bool CWeaponAR2::CanHolster( void ) {   if ( m_bShotDelayed )     return false;   return BaseClass::CanHolster(); } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v762\/\" rel=\"noopener noreferrer nofollow\">V762<\/a> It is possible a virtual function was overridden incorrectly. See qualifiers of function &#8216;CanHolster&#8217; in derived class &#8216;C_WeaponAR2&#8217; and base class &#8216;C_BaseCombatWeapon&#8217;. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/game\/shared\/hl2mp\/weapon_ar2.h#L48\" rel=\"noopener noreferrer nofollow\">weapon_ar2.h<\/a> 48<\/p>\n<p>\u0418\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0437\u0430\u043c\u0435\u0442\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e\u043c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041d\u043e \u0447\u0442\u043e \u043c\u043e\u0433\u043b\u043e \u043f\u043e\u0439\u0442\u0438 \u043d\u0435 \u0442\u0430\u043a?<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435, \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u043a\u043d\u0435\u043c \u0432 \u043a\u043e\u0434. \u0415\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <code>CBaseCombatWeapon<\/code>, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>CanHolster<\/code>. \u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 <code>CWeaponAR2<\/code> \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439-\u0447\u043b\u0435\u043d\u043e\u043c <code>CanHolster<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0437\u0430\u0434\u0443\u043c\u043a\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u044d\u0442\u0438 \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>CanHolster<\/code> \u0438\u043c\u0435\u044e\u0442 \u043f\u043e\u0447\u0442\u0438 \u0447\u0442\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u2014 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>const<\/code> \u043f\u043e\u0441\u043b\u0435 \u0438\u043c\u0435\u043d\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/language\/virtual.html\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a> \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u0438\u043c\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0438\u043f\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043d\u0435\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0442\u0438\u043f\u044b \u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>[\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e] \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0435 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0442\u043e \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u043a\u0440\u043e\u0435\u0442 \u0438\u043c\u044f \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>const<\/code> \u043f\u043e\u0441\u043b\u0435 \u0438\u043c\u0435\u043d\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u0447\u043b\u0435\u043d\u0430 \u0438\u0437 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u0418 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>override<\/code>, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c:<\/p>\n<pre><code class=\"cpp\">class CWeaponAR2 : public CHL2MPMachineGun { public:   ....   bool CanHolster( void ) const override;   .... }; <\/code><\/pre>\n<p>\u041d\u0435\u043f\u043e\u0434\u0430\u043b\u0451\u043a\u0443 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b\u0438\u0441\u044c \u0435\u0449\u0451 \u0434\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0442\u0430 \u0436\u0435 \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<ul>\n<li>\n<p>V762 It is possible a virtual function was overridden incorrectly. See qualifiers of function &#8216;CanHolster&#8217; in derived class &#8216;C_WeaponPhysCannon&#8217; and base class &#8216;C_BaseCombatWeapon&#8217;. weapon_physcannon.h 289<\/p>\n<\/li>\n<li>\n<p>V762 It is possible a virtual function was overridden incorrectly. See qualifiers of function &#8216;CanHolster&#8217; in derived class &#8216;C_WeaponRPG&#8217; and base class &#8216;C_BaseCombatWeapon&#8217;. weapon_rpg.h 193<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 nullptr \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f<\/h4>\n<pre><code class=\"cpp\">void CClientShadowMgr::RemoveAllShadowsFromReceiver(    IClientRenderable* pRenderable, ShadowReceiver_t type ) {   \/\/ Don't bother if this renderable doesn't receive shadows   if ( !pRenderable-&gt;ShouldReceiveProjectedTextures( \/\/ &lt;=        SHADOW_FLAGS_PROJECTED_TEXTURE_TYPE_MASK ) )     return;    \/\/ Do different things depending on the receiver type   switch( type )   {   case SHADOW_RECEIVER_BRUSH_MODEL:     {       model_t* pModel = const_cast&lt;model_t*&gt;(pRenderable-&gt;GetModel());       shadowmgr-&gt;RemoveAllShadowsFromBrushModel( pModel );     }     break;    case SHADOW_RECEIVER_STATIC_PROP:     staticpropmgr-&gt;RemoveAllShadowsFromStaticProp(pRenderable);     break;    case SHADOW_RECEIVER_STUDIO_MODEL:     if( pRenderable &amp;&amp; pRenderable-&gt;GetModelInstance() != \/\/ &lt;=         MODEL_INSTANCE_INVALID )     {       shadowmgr-&gt;RemoveAllShadowsFromModel(pRenderable-&gt;GetModelInstance());     }     break;   ... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v595\/\" rel=\"noopener noreferrer nofollow\">V595<\/a> The &#8216;pRenderable&#8217; pointer was utilized before it was verified against nullptr. Check lines: 3535, 3553. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/game\/client\/clientshadowmgr.cpp#L3535\" rel=\"noopener noreferrer nofollow\">clientshadowmgr.cpp<\/a> 3535<\/p>\n<p>\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>RemoveAllShadowsFromReceiver<\/code> \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <code>pRenderable<\/code>. \u041d\u043e \u0434\u0430\u043b\u0435\u0435 \u0432 \u043a\u0435\u0439\u0441\u0435 <code>SHADOW_RECEIVER_STUDIO_MODEL<\/code> \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <code>switch<\/code> \u0435\u0441\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u044b\u043c. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0432\u0441\u0451 \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u043d\u043d\u0438\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">\/\/ Don't bother if this renderable doesn't receive shadows if (   !pRenderable      || !pRenderable-&gt;ShouldReceiveProjectedTextures(            SHADOW_FLAGS_PROJECTED_TEXTURE_TYPE_MASK ) )   return; <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u044f\u0432\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 &#171;\u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u043c&#187;, \u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432 <code>switch<\/code> \u0441\u0442\u043e\u0438\u0442 \u0443\u0431\u0440\u0430\u0442\u044c.<\/p>\n<p>\u0422\u0430\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e, \u0438 \u043d\u0430 \u043d\u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>V595 The &#8216;pPlayer&#8217; pointer was utilized before it was verified against nullptr. Check lines: 426, 442. weapon_frag.cpp 426<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;pPlayer&#8217; pointer was utilized before it was verified against nullptr. Check lines: 146, 152. weapon_hl2mpbasebasebludgeon.cpp 146<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;pOwner&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1364, 1380. weapon_physcannon.cpp 1364<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;node&#8217; pointer was utilized before it was verified against nullptr. Check lines: 2338, 2341. nav_generate.cpp 2338<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;adjNode&#8217; pointer was utilized before it was verified against nullptr. Check lines: 2339, 2341. nav_generate.cpp 2339<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;m_goal&#8217; pointer was utilized before it was verified against nullptr. Check lines: 730, 744. NextBotPathFollow.cpp 730<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;body&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1748, 1762. NextBotPathFollow.cpp 1748<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;m_pszString&#8217; pointer was utilized before it was verified against nullptr. Check lines: 819, 827. convar.cpp 819<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;pPortal-&gt;nodes[nOtherSideIndex]&#8217; pointer was utilized before it was verified against nullptr. Check lines: 712, 715. vbsp.cpp 712<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;front&#8217; pointer was utilized before it was verified against nullptr. Check lines: 397, 475, 477. polylib.cpp 475<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;m_pCommand&#8217; pointer was utilized before it was verified against nullptr. Check lines: 251, 252. consoledialog.cpp 251<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;_title&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1594, 1603. Frame.cpp 1594<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;pActionSignalTarget&#8217; pointer was utilized before it was verified against nullptr. Check lines: 636, 642. perforcefilelistframe.cpp 636<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;_activeTab&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1063, 1087. PropertySheet.cpp 1063<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;m_pTree&#8217; pointer was utilized before it was verified against nullptr. Check lines: 132, 144. TreeViewListControl.cpp 132<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;pShaderShadow&#8217; pointer was utilized before it was verified against nullptr. Check lines: 103, 334, 335. example_model_dx9_helper.cpp 334<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<pre><code class=\"cpp\">typedef unsigned char byte;  inline void CBaseEntity::SetRenderColor( byte r, byte g, byte b, byte a ) {   m_clrRender.Init( r, g, b, a ); }  void CGrenadeBugBait::BugBaitTouch( CBaseEntity *pOther ) {   ....   if ( pSporeExplosion )   {     ....     pSporeExplosion-&gt;SetRenderColor( 0.0f, 0.5f, 0.25f, 0.15f ); \/\/ &lt;=     ....   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v674\/\" rel=\"noopener noreferrer nofollow\">V674<\/a> The literal &#8216;0.5f&#8217; of &#8216;float&#8217; type is being implicitly cast to &#8216;unsigned char&#8217; type while calling the &#8216;SetRenderColor&#8217; function. Inspect the second argument. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/game\/server\/hl2\/grenade_bugbait.cpp#L168\" rel=\"noopener noreferrer nofollow\">grenade_bugbait.cpp<\/a> 168<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>SetRenderColor<\/code> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u043f\u043e <strong>RGBA<\/strong>, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <code>unsigned char<\/code> \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <code>[0 .. 255]<\/code>. \u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0441 \u0442\u0438\u043f\u043e\u043c <code>float<\/code> \u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0431\u0440\u043e\u0448\u0435\u043d\u0430. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>r<\/code>, <code>g<\/code>, <code>b<\/code>, <code>a<\/code> \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0432\u043d\u044b\u0435 <code>0<\/code>.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e blame, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435:<\/p>\n<ol>\n<li>\n<p>\u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0430 \u0446\u0432\u0435\u0442\u0430 \u0432 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438. \u0417\u0430\u0442\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043c\u0435\u043d\u0438\u043b\u0438 \u043d\u0430 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u043d\u043e \u0437\u0430\u0431\u044b\u043b\u0438 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432\u044b\u0437\u043e\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>SetRenderColor<\/code> \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0438 \u0437\u0430\u0434\u0430\u043b \u0438\u0445 \u0442\u0430\u043a\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439:<\/p>\n<ul>\n<li>\n<p>V674 The literal &#8216;0.5f&#8217; of &#8216;float&#8217; type is being implicitly cast to &#8216;unsigned char&#8217; type while calling the &#8216;SetRenderColor&#8217; function. Inspect the second argument. weapon_bugbait.cpp 171<\/p>\n<\/li>\n<li>\n<p>V674 The literal &#8216;25.6&#8217; of &#8216;double&#8217; type is being implicitly cast to &#8216;int&#8217; type while calling the &#8216;SetScrollRate&#8217; function. Inspect the first argument. grenade_tripmine.cpp 179<\/p>\n<\/li>\n<\/ul>\n<h4>\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/h4>\n<pre><code class=\"cpp\">template &lt;class T&gt; void AddSortedByName(T * &amp; head, T * node) {   if ( (! head) || (stricmp(node-&gt;m_Name, head-&gt;m_Name) == -1))   {     ....   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v698\/\" rel=\"noopener noreferrer nofollow\">V698<\/a> Expression &#8216;stricmp(&#8230;.) == -1&#8217; is incorrect. This function can return not only the value &#8216;-1&#8217;, but any negative value. Consider using &#8216;stricmp(&#8230;.) &lt; 0&#8217; instead. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/public\/tier1\/utlintrusivelist.h#L509\" rel=\"noopener noreferrer nofollow\">utlintrusivelist.h<\/a> 509<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <a href=\"https:\/\/learn.microsoft.com\/en-us\/cpp\/c-runtime-library\/reference\/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l?view=msvc-170\" rel=\"noopener noreferrer nofollow\"><code>stricmp<\/code><\/a> \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 <code>node-&gt;m_Name<\/code> \u043b\u0435\u043a\u0441\u0438\u043a\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c <code>head-&gt;m_Name<\/code> (\u0431\u0435\u0437 \u0443\u0447\u0451\u0442\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>stricmp<\/code> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>-1<\/code> \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">if ( (! head) || (stricmp(node-&gt;m_Name, head-&gt;m_Name) &lt; 0)) {   .... } <\/code><\/pre>\n<h3>\u0410\u043d\u043e\u043c\u0430\u043b\u0438\u0438<\/h3>\n<h4>\u0418\u0441\u0442\u0438\u043d\u043d\u0430\u044f \u0438 \u043b\u043e\u0436\u043d\u0430\u044f \u0432\u0435\u0442\u043a\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 &#8216;if&#8217; \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442<\/h4>\n<pre><code class=\"cpp\">void CWeaponCrossbow::PrimaryAttack( void ) {   if ( m_bInZoom &amp;&amp; g_pGameRules-&gt;IsMultiplayer() )   {     \/\/FireSniperBolt();     FireBolt();   }   else   {     FireBolt();   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v523\/\" rel=\"noopener noreferrer nofollow\">V523<\/a> The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/game\/shared\/hl2mp\/weapon_crossbow.cpp#L542\" rel=\"noopener noreferrer nofollow\">weapon_crossbow.cpp<\/a> 542<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u0430\u044f \u0438 \u043b\u043e\u0436\u043d\u0430\u044f \u0432\u0435\u0442\u043a\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <code>if<\/code> \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442. \u041f\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044e \u0432 \u043a\u043e\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u0446\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u0433\u043e\u043d\u044c \u0432 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u0435\u0440\u0435, \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f. \u041d\u043e \u0441\u0430\u043c\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0430 \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u044b \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0412 \u043e\u0442\u0447\u0451\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0431\u044b\u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u0435\u0449\u0451 \u043f\u044f\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u043c\u0435\u0441\u0442:<\/p>\n<details class=\"spoiler\">\n<summary>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f.<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>V523 The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. c_basehlplayer.cpp 634<\/p>\n<\/li>\n<li>\n<p>V523 The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. hl2_triggers.cpp 752<\/p>\n<\/li>\n<li>\n<p>V523 The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. npc_combine.cpp 2528<\/p>\n<\/li>\n<li>\n<p>V523 The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. npc_ichthyosaur.cpp 724<\/p>\n<\/li>\n<li>\n<p>V523 The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. Menu.cpp 1185<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h4>\u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/h4>\n<pre><code class=\"cpp\">float CInput::KeyState ( kbutton_t *key ) {   ....   if ( impulseup &amp;&amp; !impulsedown )   {     \/\/ released this frame?     val = down ? 0.0 : 0.0; \/\/ &lt;=   }   ....   return val; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v583\/\" rel=\"noopener noreferrer nofollow\">V583<\/a> The &#8216;?:&#8217; operator, regardless of its conditional expression, always returns one and the same value: 0.0. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/game\/client\/in_main.cpp#L605\" rel=\"noopener noreferrer nofollow\">in_main.cpp<\/a> 605<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<h4>\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439<\/h4>\n<pre><code class=\"cpp\">void CBaseVSShader::SetPixelShaderConstant_W(int pixelReg,                                              int constantVar,                                              float fWValue ) {   ....   float val[4];   if (pPixelVar-&gt;GetType() == MATERIAL_VAR_TYPE_VECTOR)     pPixelVar-&gt;GetVecValue( val, 4 );   else     val[0] = val[1] = val[2] = val[3] = pPixelVar-&gt;GetFloatValue();   val[3]=fWValue; \/\/ &lt;=   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v519\/\" rel=\"noopener noreferrer nofollow\">V519<\/a> The &#8216;val[3]&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 124, 125. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/materialsystem\/stdshaders\/BaseVSShader.cpp#L125\" rel=\"noopener noreferrer nofollow\">BaseVSShader.cpp<\/a> 125<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>val[3]<\/code> \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043f\u043e\u0434\u0440\u044f\u0434 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u0447\u0451\u043c \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0441\u0430\u043c\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430, \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f: <code>val[3] += fWValue<\/code>.<\/p>\n<h4>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0430 \u0441\u0435\u0431\u0435<\/h4>\n<pre><code class=\"cpp\">void CNPC_Monk::Spawn() {   ....   m_flFieldOfView = m_flFieldOfView = -0.707; \/\/ 270`   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v570\/\" rel=\"noopener noreferrer nofollow\">V570<\/a> The same value is assigned twice to the &#8216;m_flFieldOfView&#8217; variable. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/game\/server\/hl2\/npc_monk.cpp#L274\" rel=\"noopener noreferrer nofollow\">npc_monk.cpp<\/a> 274<\/p>\n<p>\u041f\u043e\u043b\u044e <code>m_flFieldOfView<\/code> \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>-0.707<\/code> (\u043a\u043e\u0441\u0438\u043d\u0443\u0441 \u0443\u0433\u043b\u0430 \u043e\u0431\u0437\u043e\u0440\u0430 \u0432 135 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432). \u041b\u0438\u0431\u043e \u044d\u0442\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430, \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u043f\u043e\u043b\u0435, \u043b\u0438\u0431\u043e \u043e\u0434\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u043b\u0438\u0448\u043d\u0435\u0435, \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c.<\/p>\n<h4>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u0442\u0430\u043b \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u043c<\/h4>\n<pre><code class=\"cpp\">void SendProxy_UtlVectorElement(...., int iElement, ....) {   ....   iElement = pProp-&gt;GetElementStride();   ....   if ( iElement &gt;= pUtlVec-&gt;Count() )   {     ....   }   else   {     pExtra-&gt;m_ProxyFn(       pProp, pData,        (char*)pUtlVec-&gt;Base() + iElement*pExtra-&gt;m_ElementStride,       pOut, 0, objectID );   } } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v763\/\" rel=\"noopener noreferrer nofollow\">V763<\/a> Parameter &#8216;iElement&#8217; is always rewritten in function body before being used. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/public\/dt_utlvector_send.cpp#L49\" rel=\"noopener noreferrer nofollow\">dt_utlvector_send.cpp<\/a> 49<\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>iElement<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043e \u043a\u043e\u043f\u0438\u0438, \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043b\u0438\u0448\u044c \u0437\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u042d\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u043f\u0440\u043e\u043f\u0430\u043b\u0430, \u043d\u043e \u043d\u0430 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u043a\u043e\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0422\u043e\u0433\u0434\u0430 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c, \u0438 \u0443 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"cpp\">void SendProxy_UtlVectorElement(...., int \/* iElement *\/, ....) {   ....   auto iElement = pProp-&gt;GetElementStride();   .... } <\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f.<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>V763 Parameter &#8216;flDist&#8217; is always rewritten in function body before being used. npc_cranedriver.cpp 180<\/p>\n<\/li>\n<li>\n<p>V763 Parameter &#8216;flDist&#8217; is always rewritten in function body before being used. npc_strider.cpp 2561<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u0442\u044c \u0432\u0430\u0441, \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439, \u0447\u0442\u043e \u043e\u0442\u043b\u043e\u0436\u0438\u043b\u0438 \u0441\u0432\u043e\u0438 \u0434\u0435\u043b\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e \u0441\u0442\u0430\u0440\u0435\u0439\u0448\u0438\u043c \u0440\u043e\u043d\u0438\u043d\u043e\u043c Source SDK, \u0441\u0440\u0430\u0436\u0430\u044f\u0441\u044c \u0441 \u0447\u0443\u0436\u0435\u0440\u043e\u0434\u043d\u044b\u043c\u0438 \u0444\u043e\u0440\u043c\u0430\u043c\u0438 \u0436\u0438\u0437\u043d\u0438. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0438 \u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/try-free\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1281\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c<\/a> \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio, \u0434\u043b\u044f open source \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0443 \u043d\u0430\u0441 <a href=\"https:\/\/pvs-studio.ru\/ru\/order\/open-source-license\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f<\/a> \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044f.<\/p>\n<p>\u0427\u0442\u043e \u0436, \u043d\u0430\u043c \u043f\u043e\u0440\u0430 \u043f\u0440\u043e\u0449\u0430\u0442\u044c\u0441\u044f. \u0412\u0441\u0435\u0445 \u0431\u043b\u0430\u0433 \u0432\u0430\u043c, \u0438 \u0434\u043e \u043d\u043e\u0432\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447!<\/p>\n<p>\u041f\u043e\u0434\u043e\u0436\u0434\u0438, \u0441\u043b\u044b\u0448\u0438\u0442\u0435 \u0437\u0432\u0443\u043a\u0438? \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u043b\u043e\u0433\u043e\u0432\u043e \u0445\u0435\u0434\u043a\u0440\u0430\u0431\u043e\u0432. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e, \u043f\u043e\u0434\u043b\u0430\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0440\u0430\u043d\u044b \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u0438\u0442\u044c \u043e\u0431\u043e\u0439\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u044c \u044d\u0442\u0438\u0445 \u0442\u0432\u0430\u0440\u0435\u0439. \u0410 \u043f\u043e\u043a\u0430 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0438\u0432\u0430\u043b \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0448\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435\u043c.<\/p>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Denis Tukupov. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/cpp\/1281\/\" rel=\"noopener noreferrer nofollow\">Combating headcrabs in the Source SDK codebase<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/943626\/\"> https:\/\/habr.com\/ru\/articles\/943626\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>GameDev \u0442\u0435\u0440\u043d\u0438\u0441\u0442 \u0438 \u043d\u0435\u0438\u0441\u043f\u043e\u0432\u0435\u0434\u0438\u043c. \u041a\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043e\u043d \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f \u043a\u0440\u043e\u0432\u044c\u044e \u0438 \u043f\u043e\u0442\u043e\u043c, \u0441\u0440\u0430\u0436\u0430\u044f\u0441\u044c \u0441 \u0442\u0432\u0430\u0440\u044f\u043c\u0438, \u0442\u044c\u043c\u043e\u0439 \u043f\u043e\u0440\u043e\u0436\u0434\u0451\u043d\u043d\u044b\u043c\u0438: \u0431\u0430\u0440\u043d\u0430\u043a\u043b\u044b, \u043f\u0438\u044f\u0432\u043a\u0438, \u043c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u044b\u0435 \u043b\u044c\u0432\u044b. \u0418 \u044d\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0441\u043a\u0430\u0437\u043e\u0447\u043a\u0430, \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043c\u0430\u0437\u043e\u0447\u043a\u0430. \u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0441\u0442\u0435\u0440\u0435\u0433\u0430\u0442\u044c\u0441\u044f \u0436\u0443\u043a\u043e\u0432 \u0445\u0435\u0434\u043a\u0440\u0430\u0431\u043e\u0432. \u0414\u0430, \u044d\u0442\u043e \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u0431\u0430\u0433\u0438 \u0432 \u043a\u043e\u0434\u0435. \u0415\u0441\u043b\u0438 \u0438\u0445 \u0432\u043e\u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0443\u0431\u0438\u0442\u044c \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439, \u0442\u043e \u0432\u0430\u0448\u0430 \u0443\u0447\u0430\u0441\u0442\u044c \u2014 \u0441\u0442\u0430\u0442\u044c \u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u0430\u0434\u0430\u0432\u0440\u043e\u043c. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u043f\u043e\u0431\u044b\u0432\u0430\u0442\u044c \u0432 \u0440\u043e\u043b\u0438 \u0413\u043e\u0440\u0434\u043e\u043d\u0430 \u0424\u0440\u0438\u043c\u0435\u043d\u0430, \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u043d\u0435\u0434\u0440\u044b Source SDK \u0438 \u043f\u043e\u0431\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u0441 \u0445\u0435\u0434\u043a\u0440\u0430\u0431\u0430\u043c\u0438. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0436\u0435 \u0432\u044b\u0441\u0442\u0443\u043f\u0438\u0442 PVS-Studio.<\/p>\n<figure class=\"\"><\/figure>\n<h3>\u041e \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u044c \u043c\u0435\u0436\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0432\u0440\u0430\u0442\u0430, \u043d\u0430\u0448 \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0413\u043e\u0440\u0434\u043e\u043d, \u0438\u0437\u0443\u0447\u0438\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u043f\u0440\u0430\u0432\u043a\u0443 \u043e \u043c\u0438\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c.<\/p>\n<p><a href=\"https:\/\/developer.valvesoftware.com\/wiki\/Source_SDK_Base_2013\" rel=\"noopener noreferrer nofollow\">Source SDK<\/a> \u2014 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043c\u043e\u0434\u043e\u0432, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0434\u043b\u044f \u0438\u0433\u0440 \u043d\u0430 \u0434\u0432\u0438\u0436\u043a\u0435 <a href=\"https:\/\/halflife.fandom.com\/ru\/wiki\/Source\" rel=\"noopener noreferrer nofollow\">Source<\/a> Engine, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0435\u0439 Valve. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u044b, \u043c\u043e\u0434\u044b, \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043b\u0438\u0446\u0430 NPC \u0438\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439.<\/p>\n<p>\u041c\u044b \u043f\u043e\u0438\u0441\u0442\u0438\u043d\u0435 \u0440\u0430\u0434\u044b \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0441 \u043d\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0229\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>. \u041d\u043e \u043f\u0440\u043e\u0435\u043a\u0442 Source SDK \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435, \u0440\u0430\u0441\u0442\u0451\u0442 \u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0438 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/0010\/\" rel=\"noopener noreferrer nofollow\">PVS-Studio<\/a>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0432\u0430\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0438\u0443\u0440\u043e\u0447\u0435\u043d\u0430 \u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0434\u0432\u0438\u0436\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0435\u043c\u0430\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439: \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0433\u0440\u044b \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c 4 \u0413\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 VGUI \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a 4K. \u041d\u043e \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043a\u0440\u0443\u043f\u043d\u044b\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432 Source SDK \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u0434 Team Fortress 2. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043c\u043e\u0434\u0434\u0435\u0440\u0430\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c TF2 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u044b\u0445 \u0438\u0433\u0440 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 TF2.<\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0441\u044f \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>. \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0438\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439. \u041a\u043e\u043c\u043c\u0438\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b \u0441\u043e\u0431\u0440\u0430\u043d \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u2014 <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/tree\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\" rel=\"noopener noreferrer nofollow\">68c8b82<\/a>.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u044e \u0432\u043e\u0448\u043b\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0440\u043e\u0432\u043d\u044f High (\u0435\u0441\u0442\u044c \u0435\u0449\u0451 Medium \u0438 Low).<\/p>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/h3>\n<h3>\u041e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438<\/h3>\n<h4>\u0412\u044b\u0445\u043e\u0434 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/h4>\n<pre><code class=\"cpp\">class DVariant {   ....   union   {     ....     float m_Vector[3];     ....   };   .... };  \/\/ This is passed into RecvProxy functions. class CRecvProxyData { public:   ....   DVariant m_Value; \/\/ The value given to you to store.   .... };  void RecvProxy_QuaternionToQuaternion( const CRecvProxyData *pData,  void *pStruct, void *pOut ) {   const float *v = pData-&gt;m_Value.m_Vector;      Assert( IsFinite( v[0] ) &amp;&amp; IsFinite( v[1] ) &amp;&amp;           IsFinite( v[2] ) &amp;&amp; IsFinite( v[3] ) );   ((float*)pOut)[0] = v[0];   ((float*)pOut)[1] = v[1];   ((float*)pOut)[2] = v[2];   ((float*)pOut)[3] = v[3]; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v557\/\" rel=\"noopener noreferrer nofollow\">V557<\/a> Array overrun is possible. The &#8216;3&#8217; index is pointing beyond array bound. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/public\/dt_recv.cpp#L369\" rel=\"noopener noreferrer nofollow\">dt_recv.cpp<\/a> 369, 373<\/p>\n<p>\u041f\u043e\u043b\u0435 <code>m_Value<\/code> \u0442\u0438\u043f\u0430 <code>DVariant<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f \u043c\u0430\u0441\u0441\u0438\u0432 <code>m_Vector<\/code> \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0438\u0437 3 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0412 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>RecvProxy_QuaternionToQuaternion<\/code> \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 4-\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0432\u0441\u0451. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044f <code>m_Vector<\/code> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/public\/dt_common.h#L191-L195\" rel=\"noopener noreferrer nofollow\">\u0445\u0438\u0442\u0440\u0435\u0435<\/a>:<\/p>\n<pre><code class=\"cpp\">union {   .... #if 0 \/\/ We can't ship this since it changes the size of DTVariant        \/\/ to be 20 bytes instead of 16 and that breaks MODs!!!   float m_Vector[4]; #else   float m_Vector[3]; #endif   .... }; <\/code><\/pre>\n<p>\u0421\u0443\u0434\u044f \u0438\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f, \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0445\u043e\u0442\u0435\u043b\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0434\u043e <code>4<\/code>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0432\u0435\u0441\u044c \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u0434. \u0421\u043f\u0443\u0441\u0442\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0441\u043e\u0437\u043d\u0430\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043b\u043e\u043c\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u043c\u043e\u0434\u0430\u043c\u0438, \u0438 \u043e\u0442\u043a\u0430\u0442\u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u043a\u0438. \u041d\u043e, \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u0435\u0441\u0442\u0430\u0445.<\/p>\n<h4>\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/h4>\n<pre><code class=\"cpp\">class CCamoMaterialProxy : public CEntityMaterialProxy { public:   CCamoMaterialProxy();   virtual ~CCamoMaterialProxy();   .... private:   ....   void GenerateRandomPointsInNormalizedCube( void );   .... private:   ....   Vector *m_pointsInNormalizedBox; \/\/ [m_CamoPatternNumColors]   .... };  void CCamoMaterialProxy::GenerateRandomPointsInNormalizedCube( void ) {   m_pointsInNormalizedBox = new Vector[m_CamoPatternNumColors];   .... }  CCamoMaterialProxy::~CCamoMaterialProxy() {   ....   delete m_pointsInNormalizedBox; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v611\/\" rel=\"noopener noreferrer nofollow\">V611<\/a> The memory was allocated using the &#8216;operator new[]&#8217; but was released using the &#8216;operator delete&#8217;. The &#8216;delete[] m_pointsInNormalizedBox;&#8217; statement should be used instead. Check lines: 164, 561. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/game\/client\/camomaterialproxy.cpp#L164\" rel=\"noopener noreferrer nofollow\">camomaterialproxy.cpp<\/a> 164<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 <code>CCamoMaterialProxy<\/code> \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <code>new[]<\/code> \u0438 \u0437\u0430\u0442\u0435\u043c \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <code>delete<\/code>. \u041f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 <a href=\"https:\/\/timsong-cpp.github.io\/cppwp\/n4950\/expr.delete#2\" rel=\"noopener noreferrer nofollow\">\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e<\/a>. \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <code>delete[]<\/code>, \u043b\u0443\u0447\u0448\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0430\u0448\u0435\u0439 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0973\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0451\u0439<\/a>.<\/p>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">CCamoMaterialProxy::~CCamoMaterialProxy() {   ....   delete[] m_pointsInNormalizedBox; } <\/code><\/pre>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/h4>\n<pre><code class=\"cpp\">KeyValues *KeyValues::FindKey(const char *keyName, bool bCreate) {   \/\/ return the current key if a NULL subkey is asked for   if (!keyName || !keyName[0]) \/\/ &lt;=     return this;    \/\/ look for '\/' characters deliminating sub fields   char szBuf[256] = { 0 };   const char *subStr = strchr(keyName, '\/');   const char *searchStr = keyName;               \/\/ pull out the substring if it exists   if (subStr)   {     int size = Min( (int)(subStr - keyName + 1),    (int)V_ARRAYSIZE( szBuf ) );     V_strncpy( szBuf, keyName, size );     ....   }   .... }  void LoadCmdLineFromFile( int &amp;argc, char **&amp;argv,                            const char *keyname,                           const char *appname ) {   ....   if ( kv-&gt;LoadFromFile( g_pFileSystem, filename ) )   {     \/\/ Load the commandline arguments for this app     KeyValues  *appKey  = kv-&gt;FindKey( keyname );     ....   }   .... }  int RunVVis( int argc, char **argv ) {   char portalfile[1024];   char source[1024];   char mapFile[1024];   double start, end;   ....   LoadCmdLineFromFile( argc, argv, source, \"vvis\" );   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v614\/\" rel=\"noopener noreferrer nofollow\">V614<\/a> [CERT-EXP53-CPP] Uninitialized buffer &#8216;source&#8217; used. Consider checking the third actual argument of the &#8216;LoadCmdLineFromFile&#8217; function. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/utils\/vvis\/vvis.cpp#L1095C2-L1095C52\" rel=\"noopener noreferrer nofollow\">vvis.cpp<\/a> 1095<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>source<\/code>, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c. \u041f\u0440\u043e\u0439\u0434\u0451\u043c\u0441\u044f \u043f\u043e \u043a\u043e\u0434\u0443 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 <code>source<\/code> \u0442\u0438\u043f\u0430 <code>char[1024]<\/code> \u0431\u0435\u0437 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0432 \u044f\u0447\u0435\u0439\u043a\u0430\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u0430\u043b\u0435\u0435 <code>source<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/public\/loadcmdline.cpp#L75\" rel=\"noopener noreferrer nofollow\"><code>LoadCmdLineFromFile<\/code><\/a>, \u0430 \u0442\u0430 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0435\u0433\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/tier1\/KeyValues.cpp#L987\" rel=\"noopener noreferrer nofollow\"><code>FindKey<\/code><\/a>. \u0418 \u0443\u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0447\u0442\u0451\u043d, \u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e.<\/p>\n<h3>\u041d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043d\u043e \u0444\u0430\u043a\u0442<\/h3>\n<h4>Same, same but different<\/h4>\n<pre><code class=\"cpp\">class CBaseCombatWeapon : public BASECOMBATWEAPON_DERIVED_FROM { public:   ....   virtual bool CanHolster( void ) const { return TRUE; };   .... };  class CWeaponAR2 : public CHL2MPMachineGun { public:   ....   bool CanHolster( void );   .... };  bool CWeaponAR2::CanHolster( void ) {   if ( m_bShotDelayed )     return false;   return BaseClass::CanHolster(); } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v762\/\" rel=\"noopener noreferrer nofollow\">V762<\/a> It is possible a virtual function was overridden incorrectly. See qualifiers of function &#8216;CanHolster&#8217; in derived class &#8216;C_WeaponAR2&#8217; and base class &#8216;C_BaseCombatWeapon&#8217;. <a href=\"https:\/\/github.com\/ValveSoftware\/source-sdk-2013\/blob\/68c8b82fdcb41b8ad5abde9fe1f0654254217b8e\/src\/game\/shared\/hl2mp\/weapon_ar2.h#L48\" rel=\"noopener noreferrer nofollow\">weapon_ar2.h<\/a> 48<\/p>\n<p>\u0418\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0437\u0430\u043c\u0435\u0442\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e\u043c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041d\u043e \u0447\u0442\u043e \u043c\u043e\u0433\u043b\u043e \u043f\u043e\u0439\u0442\u0438 \u043d\u0435 \u0442\u0430\u043a?<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435, \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u043a\u043d\u0435\u043c \u0432 \u043a\u043e\u0434. \u0415\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <code>CBaseCombatWeapon<\/code>, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>CanHolster<\/code>. \u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 <code>CWeaponAR2<\/code> \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439-\u0447\u043b\u0435\u043d\u043e\u043c <code>CanHolster<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0437\u0430\u0434\u0443\u043c\u043a\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u044d\u0442\u0438 \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>CanHolster<\/code> \u0438\u043c\u0435\u044e\u0442 \u043f\u043e\u0447\u0442\u0438 \u0447\u0442\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u2014 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>const<\/code> \u043f\u043e\u0441\u043b\u0435 \u0438\u043c\u0435\u043d\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/language\/virtual.html\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a> \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u0438\u043c\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0438\u043f\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043d\u0435\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0442\u0438\u043f\u044b \u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>[\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e] \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0435 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0442\u043e \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u043a\u0440\u043e\u0435\u0442 \u0438\u043c\u044f \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>const<\/code> \u043f\u043e\u0441\u043b\u0435 \u0438\u043c\u0435\u043d\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u0447\u043b\u0435\u043d\u0430 \u0438\u0437 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u0418 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>override<\/code>, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c:<\/p>\n<pre><code class=\"cpp\">class CWeaponAR2 : public CHL2MPMachineGun { public:   ....   bool CanHolster( void ) const override;   .... }; <\/code><\/pre>\n<p>\u041d\u0435\u043f\u043e\u0434\u0430\u043b\u0451\u043a\u0443 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b\u0438\u0441\u044c \u0435\u0449\u0451 \u0434\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0442\u0430 \u0436\u0435 \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<ul>\n<li>\n<p>V762 It is possible a virtual function was overridden incorrectly. See qualifiers of function &#8216;CanHolster&#8217; in derived class &#8216;C_WeaponPhysCannon&#8217; and base class &#8216;C_BaseCombatWeapon&#8217;. weapon_physcannon.h 289<\/p>\n<\/li>\n<li>\n<p>V762 It is possible a virtual function was overridden incorrectly. See qualifiers of function &#8216;CanHolster&#8217; in derived class &#8216;C_WeaponRPG&#8217; and base class &#8216;C_BaseCombatWeapon&#8217;. weapon_rpg.h 193<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 nullptr \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f<\/h4>\n<pre><code class=\"cpp\">void CClientShadowMgr::RemoveAllShadowsFromReceiver(    IClientRenderable* pRenderable, ShadowReceiver_t type ) {   \/\/ Don't bother if this renderable doesn't receive shadows   if ( !pRenderable-&gt;ShouldReceiveProjectedTextures( \/\/ &lt;=        SHADOW_FLAGS_PROJECTED_TEXTURE_TYPE_MASK ) )     return;    \/\/ Do different things depending on the receiver type   switch( type )   {   case SHADOW_RECEIVER_BRUSH_MODEL:     {       model_t* pModel = const_cast&lt;model_t*&gt;<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-473846","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/473846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=473846"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/473846\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=473846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=473846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=473846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}