25 lines
649 B
C
25 lines
649 B
C
/***
|
|
*
|
|
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
|
|
*
|
|
* See the file LICENSE attached with the sources for usage details.
|
|
*
|
|
****/
|
|
|
|
void View_UpdateWeapon(entity vm, entity mflash)
|
|
{
|
|
player pl = (player)pSeat->ePlayer;
|
|
|
|
if (pSeat->fLastWeapon != pl.activeweapon) {
|
|
pSeat->fLastWeapon = pl.activeweapon;
|
|
if (pl.activeweapon) {
|
|
setmodel(vm, g_weapons[pl.activeweapon].vmodel());
|
|
|
|
skel_delete( mflash.skeletonindex );
|
|
mflash.skeletonindex = skel_create( vm.modelindex );
|
|
pSeat->fNumBones = skel_get_numbones( mflash.skeletonindex ) + 1;
|
|
pSeat->fEjectBone = pSeat->fNumBones + 1;
|
|
}
|
|
Weapons_Draw();
|
|
}
|
|
}
|