you do not commit gross negligence (basically an intentional bad act or acting with reckless disregard for the well-being of others).

There are other exceptions, but the three elements above are the ones to focus on for this discussion.

With regard to #2 (compensation), there is a suggestion that the government could pay a licensed professional, while maintaining the liability shield (this is Texas state law), but given that The Volunteer Protection Act of 1997 preempts state law and defines volunteer as: “an individual performing services for a nonprofit organization or a governmental entity who does not receive— (A) compensation (other than reasonable reimbursement or allowance for expenses actually incurred); or (B) any other thing of value in lieu of compensation, in excess of $500 per year, and such term includes a volunteer serving as a director, officer, trustee, or direct service volunteer” the more conservative approach is to not seek compensation if a license-holder wishes to maintain volunteer status and, accordingly, the liability shield.

Sec. 150.003. LIABILITY FOR SERVICES RENDERED DURING DISASTER. (a) This section applies only to a licensed or registered professional who provides architectural or engineering services if the services:
(1) are authorized, as appropriate for the professional, in:
(A) Chapter 1001, Occupations Code;
(B) Chapter 1051, Occupations Code;
(C) 22 T.A.C. Part 6 (Texas Board of Professional Engineers), Chapter 137 (Compliance and Professionalism); and
(D) 22 T.A.C. Part 1 (Texas Board of Architectural Examiners), Chapter 1 (Architects), Subchapter H (Professional Conduct);
(2) subject to Subsection (d), are provided voluntarily and without compensation or the expectation of compensation;
(3) are in response to and provided during the duration of a proclaimed state of emergency under Section 433.001, Government Code, or a declared state of disaster under Section 418.014, Government Code;
(4) are provided at the request or with the approval of a federal, state, or local public official acting in an official capacity in response to the proclaimed state of emergency or declared disaster, including a law enforcement official, public safety official, or building inspection official; and
(5) are related to a structure, building, roadway, piping, or other system, either publicly or privately owned.
(b) A licensed or registered professional who provides the services to which this section applies is not liable for civil damages, including personal injury, wrongful death, property damage, or other loss related to the professional's act, error, or omission in the performance of the services, unless the act, error, or omission constitutes:
(1) gross negligence; or
(2) wanton, wilful, or intentional misconduct.
(c) This section does not apply to a licensed or registered professional who is at the scene of the emergency to solicit business or perform a service for compensation on behalf of the professional or a person for whom the professional is an agent.
(d) The entitlement of a licensed or registered professional to receive compensation for services to which this section applies does not determine whether the services provided by the professional were provided voluntarily and without compensation or the expectation of compensation.