Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message natives #523

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions plugins/include/message_const.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1164,15 +1164,15 @@ enum TracerColor
TracerColor_Red,
TracerColor_Green,
TracerColor_Blue,
TracerColor_Yellow,
TracerColor_User,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can add a comment with its default color.

TracerColor_Orange,
TracerColor_Pink,
TracerColor_Coral,
TracerColor_Purple,
TracerColor_Pink2,
TracerColor_Pink3,
TracerColor_Pink4,
TracerColor_Pink5,
TracerColor_DarkBlue
TracerColor_Coral2,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove it, because it is just a duplicate of 6 (TracerColor_Coral).

TracerColor_Coral3,
TracerColor_Coral4,
TracerColor_Coral5,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to properly name them, color databases that I found can't distinguish them.

TracerColor_Invalid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just remove it.

}

/**
Expand Down
21 changes: 20 additions & 1 deletion plugins/include/tempent.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1270,13 +1270,32 @@ native te_create_multi_gunshot(position[3], direction[3], decal = 105, count = 1
/**
* Creates a tracer effect and allows more customization than te_create_tracer.
*
* @note If the tracer color is set to "TracerColor_User", the color will depend
* on the client cvar values for "tracerred", "tracergreen", "tracerblue"
* and "traceralpha".
* @note The color "TracerColor_Invalid" is buggy as it will output a different
* color depending on the client's operating system so you should avoid
* using it.
* @note Video preview of this and all other te_ natives can be found here:
* https://youtu.be/szW-bSMPuyQ?t=11m36s
*
* @param position Effect position
* @param velocity Effect velocity
* @param life The length of time the effect shall remain, multiplied by 10 (0 - 255)
* @param color Tracer color (0 - 12)
* @param color Tracer color:
* TracerColor_White
* TracerColor_Red
* TracerColor_Green
* TracerColor_Blue
* TracerColor_User
* TracerColor_Orange
* TracerColor_Coral
* TracerColor_Purple
* TracerColor_Coral2
* TracerColor_Coral3
* TracerColor_Coral4
* TracerColor_Coral5
* TracerColor_Invalid
* @param length Length of the tracer (0 - 255)
* @param receiver Client index that will be able to see the effect
* or 0 for all clients
Expand Down