请选择 进入手机版 | 继续访问电脑版
设为首页收藏本站

ESFKAMI

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz

ESFX

ESF: Xenoverse

ESF123

ESF1.2.3

EVM2.1

EVM2.1

ECXSSJ

ECX: TeamSSJ

ECX2.2

ECX RC2

ECX2.3

ECX RC3

查看: 585|回复: 0

[教程|Tutorial]暴气模型角度修正|Aura Model Angles Fix

[复制链接]

206

主题

211

帖子

981

积分

ESFKAMI

Rank: 8Rank: 8

积分
981
发表于 2017-7-13 13:24:31 | 显示全部楼层 |阅读模式
我们在游戏中让人物冲刺时偶尔会遇到一种情况,那就是冲刺时暴气的模型方向不对(如下图)  本文将告诉你如何修正暴气模型在冲刺时的方向, 也就是角度
Occationally when your character is swooping, you may see the direction of the aura model is not correct(shown below). So this tutorial will tell you how to fix this problem.
错误的角度|Wrong Angles:



正确的角度|The Correct Angles:



首先我们需要知道暴气模型是如何在游戏中运作的:正常的暴气模型都会包含两个子模型,子模型1是头朝上的,而子模型2则是头朝下的[]First we need to know how the aura model works in the game: Usually an aura model has two submodels, the direction of the submodel 1 is upward, the direction of the submodel 2 is downward.

这个是子模型1|Submodel 1:



这个是子模型2|Submodel 2:



在正常暴气时程序会调会子模型1:
The program will load the submodel 1 when the client is just on 'Turbo':


而在冲刺时程序调用的是子模型2:
The program will load the submodel 2 when the client is swooping:


然而如果子模型2和子模型1一样也是头朝上的话就会出现我们将要解决的情况:
But if the submodel 2's direction is same as the submodel 1's direction(upward), we will get the problem which we are going to fix in the tutorial:


你可以看到上图中暴气模型在玩家冲刺时所调用的子模型2因为方向(角度)反了而在游戏中也反了过来[]
As you can see the images above: while swooping,  the aura model's direction is contray because of the upward direction of the submodel 2.

通过以上信息我们可以总结出:只有暴气模型的方向为头朝下的情况下,暴气模型在冲刺时的角度才会正确[]
Through the information and analysis, we could conclude that the direction of the aura model must be downward in order to get the correct angles in swooping.


现在用你的模型浏览器读取你的暴气模型,然后查看是否存在第二个动作并且这个动作是否为头朝下的(如果没有则需要用MS3D自己做一个)
Now open you 'Model Viwer' and load your aura model, then check if there is the second animation and if the animation's direction is downward.(You have to make one if there isn't)



如果你的暴气模型里有那个动作,那就用你的AMXX编译器编译以下源码:
If there is, compile this code by AMXX Compiler:
  1. #include <amxmodx>
  2. #include <fakemeta>

  3. public plugin_init( )
  4. {
  5.         register_plugin( "Aura Swoop Angles Fix", "1.0", "ESFKAMI" )
  6.         register_forward( FM_EmitSound, "fw_EmitSound", true );
  7. }

  8. public fw_EmitSound( __int_Client, __int_Channel, const __sz_Sample[ ] )
  9. {
  10.         new __int_Entity;
  11.         while( ( __int_Entity = engfunc( EngFunc_FindEntityByString, __int_Entity, "model", "models/aura.mdl" ) ) > 0 )
  12.         {
  13.                 if( equal( __sz_Sample, "weapons/aura.wav" ) )
  14.                 {
  15.                         set_pev( __int_Entity, pev_sequence, 0 );
  16.                 }
  17.                 if( equal( __sz_Sample, "weapons/swoop.wav" ) || equal( __sz_Sample, "weapons/chainswoop.wav" ) )
  18.                 {
  19.                         set_pev( __int_Entity, pev_sequence, 1 );
  20.                 }
  21.         }
  22. }
复制代码

如果你游戏版本是2.2或者是2.2以上,将编译出来的amxx插件放到esf/core/plugins/CORE里,如果不是就放到esf/addons/amxmodx/plugins里并要在esf/addons/amxmodx/configs/plugins.ini里加入新的一行写上这个插件的文件名保存[]
Put the compiled *.amxx file in 'esf/core/plugins/CORE' If your game version is ECX. If not, put the file in 'esf/addons/amxmodx/plugins' and write the file name in esf/addons/amxmodx/configs/plugins.ini


好了,进入游戏你会发现问题被成功修复了!
OK, open your game and you will see that the problem is successfully fixed.




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|ESFKAMI    

GMT+8, 2018-1-23 04:09 , Processed in 0.254419 second(s), 21 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表